Search code examples
dockerjenkinsdeploymentbuildgitlab

I've a problem with jenkins docker integration


I've a gitlab container and i've a jenkins container locally. I can configured the CI, but but i can't solve the cd. I would like to when i push the code to repo the jenkins build my Blazor Server App solution in docker container locally.

Can you help me ?


Solution

    1. Setup a Gitlab webhook like so: https://docs.gitlab.com/ee/user/project/integrations/webhooks.html

    2. set up a Jenkins pipeline with the necessary information inside a jenkinsfile like so: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/

    3. The Gitlab webhook should send a request to the local jenkins container to execute the pipeline. You will need to make sure the appropriate ports are opened and linked between the container and the host computer.