2018-08-02 13:41:30 +00:00
|
|
|
#!groovy
|
|
|
|
|
|
|
|
build('control-center', '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-03-19 16:26:39 +00:00
|
|
|
def pipeline = {
|
2018-08-02 13:41:30 +00:00
|
|
|
runStage('init') {
|
|
|
|
withGithubSshCredentials {
|
2019-12-16 16:22:16 +00:00
|
|
|
withGithubToken {
|
|
|
|
sh 'make wc_init'
|
|
|
|
}
|
2018-08-02 13:41:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
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-03-19 16:26:39 +00:00
|
|
|
pipeDefault(pipeline, 'dr2.rbkmoney.com', 'jenkins_harbor')
|
2018-08-02 13:41:30 +00:00
|
|
|
}
|