Skip to content

added steps to test composing environment before pushing to dockerhub #43

Merged
merged 6 commits into from
May 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pipeline {
}
}
}
stage('Build') {
stage('Clean') {
steps {
script {
try{
Expand All @@ -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")
}
}
Expand Down