August 2017
Intermediate to advanced
332 pages
9h 16m
English
No matter which agent configuration you chose, we should now check if it works correctly.
Let's go back to the hello world pipeline. Usually, the builds last longer than the hello-world example, so we can simulate it by adding sleeping to the pipeline script:
pipeline { agent any stages { stage("Hello") { steps { sleep 300 // 5 minutes echo 'Hello World' } } }}
After clicking on Build Now and going to the Jenkins main page, we should see that the build is executed on an agent. Now, if we click on build many times, then different agents should be executing different builds (as shown in the following screenshot):

Read now
Unlock full access