image-build-erlang/Jenkinsfile
2021-08-18 17:25:10 +03:00

26 lines
496 B
Groovy

#!groovy
// -*- mode: groovy -*-
build('image-build-erlang', 'docker-host') {
checkoutRepo()
runStage('build image') {
withPublicRegistry() {
withPrivateRegistry() {
sh 'make build-erlang'
}
}
}
withPrivateRegistry() {
try {
if (env.BRANCH_NAME == 'master') {
runStage('docker image push') {
sh 'make push'
}
}
} finally {
runStage('rm local image') {
sh 'make clean'
}
}
}
}