August 2017
Intermediate to advanced
332 pages
9h 16m
English
The configuration is static, so it's done exactly the same way as we did for the permanent agents. The only difference is that we need to install Docker on each machine that will be used as a slave. Then, we usually don't need labels because all slaves can be the same. After the slaves are configured, we define the Docker image in each pipeline script.
pipeline { agent { docker { image 'openjdk:8-jdk-alpine' } } ...}
When the build is started, the Jenkins slave starts a container from the Docker image openjdk:8-jdk-alpine and then executes all pipeline steps inside that container. This way, we always know the execution environment and don't have to configure each slave separately depending on the particular ...
Read now
Unlock full access