Skip to content

Commit

Permalink
Fix jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed Feb 19, 2021
1 parent cc01bdb commit aef63cd
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@ pipeline {
} else {
tagName = "$BRANCH_NAME"
}
dockerImage = docker.build("$registry:$tagName", "--no-cache .")
docker.withRegistry( '', 'eeajenkins' ) {
dockerImage.push()
try {
dockerImage = docker.build("$registry:$tagName", "--no-cache .")
docker.withRegistry( '', 'eeajenkins' ) {
dockerImage.push()
}
} finally {
sh "docker rmi $registry:$tagName"
}
}
}
}
post {
always {
sh "docker rmi $registry:$tagName"
}
}
}

stage('Release') {
Expand Down

0 comments on commit aef63cd

Please sign in to comment.