dashboard/Jenkinsfile

56 lines
1.2 KiB
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 {
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
}
}
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
}
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'
}
}
}
pipeDefault(pipeline)
2020-07-09 14:22:49 +00:00
}