Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #43 from docker/test-compose
added steps to test composing environment before pushing to dockerhub
chubing committed May 18, 2018
2 parents 9ac51b3 + 13c7a1b commit 9dcad39
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Jenkinsfile
@@ -31,7 +31,7 @@ pipeline {
}
}
}
stage('Build') {
stage('Clean') {
steps {
script {
try{
@@ -45,11 +45,15 @@ pipeline {
}
}
}
stage('Push') {
stage('Build') {
steps {
script {
docker.withRegistry('https://registry.hub.docker.com/', "dockerhub-$maintainer") {
def baseImg = docker.build("$maintainer/$imagename", "--no-cache .")
// test the environment
sh 'cd test-compose && ./compose.sh'
// bring down after testing
sh 'cd test-compose && docker-compose down'
baseImg.push("$tag")
}
}

0 comments on commit 9dcad39

Please sign in to comment.