Skip to content

Commit

Permalink
Update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseHouldsworth authored Apr 18, 2019
1 parent 484aba1 commit b6eb21d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node () {
stage('Preparation') { // for display purposes
// Get some code from a GitHub repository
// git '[email protected]:CMYanko/struts2-showcase-demo.git'
//checkout scm
checkout scm


// Get the Maven tool.
Expand All @@ -21,7 +21,6 @@ node () {
}
stage('Build') {
// Run the maven build
checkout scm

sh "mvn clean install"

Expand Down Expand Up @@ -57,22 +56,17 @@ node () {
}

stage('Deploy Docker Image'){
sh 'pwd'
sh 'ls -l'
sh 'cd ..'
sh 'pwd'
sh 'ls -l'
sh 'docker-compose up -d'
}

stage('Done testing?'){
input 'Done?'
}

//stage('Kill running Struts container'){
// sh 'docker ps -a | awk \'{ print $1,$2 }\' | grep struts2-rce | awk \'{print $1 }\' | xargs -I {} docker kill {}'
//sh 'mvn -v'
//}
stage('Kill running WebGoat containers'){
sh 'docker ps -a | awk \'{ print $1,$2 }\' | jessewebgoat | awk \'{print $1 }\' | xargs -I {} docker kill {}'
sh 'docker ps -a | awk \'{ print $1,$2 }\' | webwolf | awk \'{print $1 }\' | xargs -I {} docker kill {}'
}

}

Expand Down

0 comments on commit b6eb21d

Please sign in to comment.