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 {
|
2019-12-24 13:54:27 +00:00
|
|
|
sh 'make wc_init'
|
2019-12-16 16:22:16 +00:00
|
|
|
}
|
2018-08-02 13:41:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
runStage('build') {
|
|
|
|
sh 'make wc_build'
|
|
|
|
}
|
|
|
|
runStage('build image') {
|
|
|
|
sh 'make build_image'
|
|
|
|
}
|
2020-07-09 14:22:59 +00:00
|
|
|
runFESecurityTools()
|
2018-08-02 13:41:30 +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'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-07-02 09:01:55 +00:00
|
|
|
pipeDefault(pipeline)
|
2018-08-02 13:41:30 +00:00
|
|
|
}
|