dashboard/Jenkinsfile

42 lines
864 B
Plaintext
Raw Normal View History

2018-11-30 13:26:03 +00:00
#!groovy
build('dashboard', 'docker-host') {
checkoutRepo()
loadBuildUtils()
def pipeDefault
def withWsCache
runStage('load pipeline') {
env.JENKINS_LIB = "build_utils/jenkins_lib"
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
}
2019-04-02 11:56:34 +00:00
def pipeline = {
2018-11-30 13:26:03 +00:00
runStage('init') {
withGithubSshCredentials {
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'
}
}
}
2019-04-02 11:56:34 +00:00
pipeDefault(pipeline, 'dr2.rbkmoney.com', 'jenkins_harbor')
2018-11-30 13:26:03 +00:00
}