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 {
|
2019-04-25 11:56:34 +00:00
|
|
|
sh 'make submodules'
|
2020-04-20 17:35:06 +00:00
|
|
|
withGithubToken {
|
|
|
|
sh 'make wc_init'
|
|
|
|
}
|
2018-11-30 13:26:03 +00:00
|
|
|
}
|
|
|
|
}
|
2021-08-26 09:48:18 +00:00
|
|
|
if (env.BRANCH_NAME == 'master') {
|
|
|
|
runStage('build') {
|
|
|
|
withCredentials([string(credentialsId: 'SENTRY_AUTH_TOKEN', variable: 'SENTRY_AUTH_TOKEN')]) {
|
|
|
|
sh 'make wc_build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
runStage('build') {
|
|
|
|
sh "make wc_cmd WC_CMD='make build_pr'"
|
2021-08-25 14:52:01 +00:00
|
|
|
}
|
2018-11-30 13:26:03 +00:00
|
|
|
}
|
2021-01-13 10:19:27 +00:00
|
|
|
runStage('test fe (karma.js)') {
|
|
|
|
sh 'make test'
|
|
|
|
}
|
2018-11-30 13:26:03 +00:00
|
|
|
runStage('build image') {
|
|
|
|
sh 'make build_image'
|
|
|
|
}
|
2020-07-09 14:22:49 +00:00
|
|
|
runFESecurityTools()
|
2018-11-30 13:26:03 +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 20:34:38 +00:00
|
|
|
pipeDefault(pipeline)
|
2020-07-09 14:22:49 +00:00
|
|
|
}
|