December 2017
Beginner to intermediate
362 pages
8h 35m
English
The pipeline code to deploy build artifacts happens in two steps. First, we will un-stash the binary package that we stashed from the previous node Docker block. Then, we deploy the un-stashed files into the webapps folder inside the Tomcat installation directory on our testing environment. The code is as follows:
unstash 'binary'sh 'cp target/hello-0.0.1.war /home/jenkins/tomcat/webapps/';
Wrap the preceding step inside a stage called Deploy:
stage ('Deploy){ unstash 'binary' sh 'cp target/hello-0.0.1.war /home/jenkins/tomcat/webapps/';}
Read now
Unlock full access