Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update Jenkinsfile
chubing committed Oct 9, 2018
1 parent 1b24c3b commit fe4fdf4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Jenkinsfile
@@ -1,6 +1,7 @@

pipeline {
agent any
def baseImg
environment {
maintainer = "t"
imagename = 'g'
@@ -52,7 +53,9 @@ pipeline {
steps {
script {
try{
sh 'bin/rebuild.sh | tee debug ; test ${PIPESTATUS[0]} -eq 0'
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
baseImg = docker.build("$maintainer/$imagename", "--no-cache .")
}
} catch(error) {
def error_details = readFile('./debug');
def message = "BUILD ERROR: There was a problem building ${imagename}:${tag}. \n\n ${error_details}"
@@ -80,8 +83,6 @@ pipeline {
stage('Push') {
steps {
script {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
def baseImg = docker.build("$maintainer/$imagename", "--no-cache .")
//// scan the image with clair
// sh 'docker run -p 5432:5432 -d --name clairdb arminc/clair-db:latest'
// sh 'docker run -p 6060:6060 --link clairdb:postgres -d --name clair arminc/clair-local-scan:v2.0.5'
@@ -97,9 +98,7 @@ pipeline {
//// bring down after testing
//sh 'cd test-compose && docker-compose down'
baseImg.push("$tag")

}
}
}
}
}
stage('Notify') {

0 comments on commit fe4fdf4

Please sign in to comment.