August 2017
Intermediate to advanced
332 pages
9h 16m
English
The last step we need is adding the "Docker build" stage to Jenkinsfile. Usually, the JAR packaging is also declared as a separate Package stage:
stage("Package") { steps { sh "./gradlew build" }}stage("Docker build") { steps { sh "docker build -t leszko/calculator ." }}
Note that we used the Docker registry name in the image tag. There is no need to have the image tagged twice calculator and leszko/calculator.
When we commit and push Jenkinsfile, the pipeline build should start automatically and we should see all boxes green. This means that the Docker image has been ...
Read now
Unlock full access