You learned a lot about Jenkins configuration throughout this chapter. To consolidate your knowledge, we recommend two exercises for preparing the Jenkins images and testing the Jenkins environment:
- Create Jenkins master and slave Docker images, and use them to run a Jenkins infrastructure capable of building Ruby projects:
- Create the Jenkins master Dockerfile, which automatically installs the Docker plugin
- Build the master image and run the Jenkins instance
- Create the slave Dockerfile (suitable for the dynamic slave provisioning), which installs the Ruby interpreter
- Build the slave image
- Change the configuration in the Jenkins instance to use the slave image
- Create a pipeline that runs a Ruby script printing Hello World from Ruby:
- Create a new pipeline
- Use the following shell command to create the hello.rb script on the fly:
sh "echo \"puts &apos...