mirror of
https://github.com/valitydev/image-columbus.git
synced 2024-11-06 02:25:16 +00:00
31 lines
573 B
Groovy
31 lines
573 B
Groovy
#!groovy
|
|
|
|
build('image-columbus', 'docker-host') {
|
|
checkoutRepo()
|
|
loadBuildUtils()
|
|
|
|
def pipeDefault
|
|
runStage('load pipeline') {
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
|
}
|
|
|
|
pipeDefault() {
|
|
runStage('build image') {
|
|
sh "make build_image"
|
|
}
|
|
try {
|
|
if (env.BRANCH_NAME == 'master') {
|
|
runStage('push image') {
|
|
sh "make push_image"
|
|
}
|
|
}
|
|
} finally {
|
|
runStage('rm local image') {
|
|
sh 'make rm_local_image'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|