Driving configuration changes through Jenkins
Next, we will learn how to make changes to the production system by running scripts from the Git repository hosted in Jenkins. We can use Jenkins both to build the Docker containers for the application and to deploy those containers on the production server. That way, any changes to either the program or to its Dockerfile
or the docker-compose.yml
file can be propagated through automation to the production system.
Here are some tips for integrating Jenkins with other systems, including GitHub, that can make your life easier. The first tip relates to the best way to configure Jenkins with a Jenkinsfile
—by storing it in a version control system.
Using Git and GitHub to store your Jenkinsfile
In the previous section, we used Jenkinsfile
entered directly into a Jenkins job to do some quick testing. That works well for doing exploratory work, but to build and manage a more complex set of scripts, you should use Git version control...