MSPF-98: Jankinsfile fix

This commit is contained in:
Ildar Galeev 2016-10-07 20:34:49 +03:00
parent 7edccfc83c
commit 954f4f81d8
2 changed files with 31 additions and 13 deletions

39
Jenkinsfile vendored
View File

@ -1,24 +1,39 @@
build('build_utils', 'docker-host') {
#!groovy
build('koffing', 'docker-host') {
checkoutRepo()
loadBuildUtils()
def pipeDefault
runStage('load pipeline') {
env.JENKINS_LIB = "./jenkins_lib"
env.JENKINS_LIB = "build_utils/jenkins_lib"
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
}
pipeDefault() {
runStage('dummy') {
echo 'OK'
//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'
}
//if (env.BRANCH_NAME == 'master') {
// runStage('build image') {
// sh "make build_image"
// }
// runStage('push image') {
// sh "make push_image"
// }
// }
try {
if (env.BRANCH_NAME == 'master') {
runStage('push image') {
sh 'make push_image'
}
}
} finally {
runStage('rm local image') {
sh 'make rm_local_image'
}
}
}
}

View File

@ -17,7 +17,7 @@ BASE_IMAGE_TAG := a58a828755e9d342ecbd7071e7dc224ffe546378
BUILD_IMAGE_TAG := 6fb209e428feaa0ef6cec07d3909d8a3c4013537
CALL_W_CONTAINER := build clean submodules
CALL_W_CONTAINER := init build clean submodules
.PHONY: $(CALL_W_CONTAINER)
@ -32,6 +32,9 @@ $(SUBTARGETS): %/.git: %
submodules: $(SUBTARGETS)
init:
npm install
build:
npm run build