Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
fix(jenkinsfile): update Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiller authored Aug 28, 2018
1 parent 53a1e9a commit b205019
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
node {

def image
stage('Clone repository') {
checkout scm
}

stage('test and publish image'){
script {
withDockerRegistry([ credentialsId: "docker1", url: "" ]) {

def customImage = docker.build("denbicloud/cloud-portal-client")
customImage.inside {sh 'make test'}
/* Push the container to the custom Registry */
customImage.push("dev")
}
}
}
}
stage('build image'){

sh 'docker rmi denbicloud/cloud-portal-client'
image = docker.build("denbicloud/cloud-portal-client")
}
stage('push image'){
withDockerRegistry([ credentialsId: "docker1", url: "" ]) {
image.push("dev")
}
}
}

0 comments on commit b205019

Please sign in to comment.