koffing/Jenkinsfile

38 lines
747 B
Plaintext
Raw Normal View History

2016-10-07 17:34:49 +00:00
#!groovy
build('koffing', 'docker-host') {
2016-08-11 17:41:31 +00:00
checkoutRepo()
2016-10-07 17:34:49 +00:00
loadBuildUtils()
2016-08-11 17:41:31 +00:00
def pipeDefault
runStage('load pipeline') {
2016-10-07 17:34:49 +00:00
env.JENKINS_LIB = "build_utils/jenkins_lib"
2016-08-11 17:41:31 +00:00
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
}
pipeDefault() {
2016-10-07 17:34:49 +00:00
//ToDo: npm stuff should be in a cache, when caching is implemented!
runStage('init') {
2016-10-11 17:51:32 +00:00
sh 'make wc_init'
2016-10-07 17:34:49 +00:00
}
runStage('build') {
sh 'make wc_build'
}
runStage('build image') {
sh 'make build_image'
2016-08-11 17:41:31 +00:00
}
2016-10-07 17:34:49 +00:00
try {
if (env.BRANCH_NAME == 'master') {
runStage('push image') {
sh 'make push_image'
}
}
} finally {
runStage('rm local image') {
sh 'make rm_local_image'
}
}
2016-08-11 17:41:31 +00:00
}
}