mirror of
https://github.com/valitydev/image-build-erlang.git
synced 2024-11-06 02:45:21 +00:00
26 lines
496 B
Groovy
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'
|
|
}
|
|
}
|
|
}
|
|
}
|