Can Jenkins work the same way as the GitLab Runner + Docker executor :
- From the image to expand the container.
- Inside the container, clone the git repository, execute arbitrary commands.
- Select the artifacts and save them outside the container, collapse the container (finish its work).
Question : I need step-by-step instructions on how to set up Jenkins to complete the above three steps.
Found Docker Plugin . It seems that he knows how to deploy a Jenkins slave in a docker, connect it to the master and dispose of it after use. This option does not exactly suit me, because I need to drag Java and other unnecessary things into the build environment. The basic jenkins-slave image weighs 100 times as much as the alpine , it is generally beyond reasonable.
docker images REPOSITORY ... SIZE alpine ... 3.97 MB evarga/jenkins-slave ... 368 MB I also found the Docker build step plugin. One of the features is "create new container from image". Maybe I need exactly this, but I do not understand how to do points 2 and 3.
.ssh/, put git, clone the repository? - Nick Volynkin ♦