mirror of
https://github.com/valitydev/koffing.git
synced 2024-11-06 09:15:20 +00:00
38 lines
747 B
Groovy
38 lines
747 B
Groovy
#!groovy
|
|
|
|
build('koffing', 'docker-host') {
|
|
checkoutRepo()
|
|
loadBuildUtils()
|
|
|
|
def pipeDefault
|
|
runStage('load pipeline') {
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
|
}
|
|
|
|
pipeDefault() {
|
|
//ToDo: npm stuff should be in a cache, when caching is implemented!
|
|
runStage('init') {
|
|
sh 'make wc_init'
|
|
}
|
|
runStage('build') {
|
|
sh 'make wc_build'
|
|
}
|
|
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'
|
|
}
|
|
}
|
|
}
|
|
}
|