2016-06-29 13:58:48 +00:00
|
|
|
#!groovy
|
2017-07-26 14:50:32 +00:00
|
|
|
// -*- mode: groovy -*-
|
2016-06-29 13:58:48 +00:00
|
|
|
|
2016-08-08 18:16:17 +00:00
|
|
|
def finalHook = {
|
|
|
|
runStage('store CT logs') {
|
|
|
|
archive '_build/test/logs/'
|
2016-07-24 16:39:27 +00:00
|
|
|
}
|
2016-08-08 18:16:17 +00:00
|
|
|
}
|
2016-06-29 13:58:48 +00:00
|
|
|
|
2016-08-08 18:16:17 +00:00
|
|
|
build('hellgate', 'docker-host', finalHook) {
|
|
|
|
checkoutRepo()
|
|
|
|
loadBuildUtils()
|
2016-06-29 13:58:48 +00:00
|
|
|
|
2016-08-08 18:16:17 +00:00
|
|
|
def pipeDefault
|
2016-10-25 11:16:12 +00:00
|
|
|
def withWsCache
|
2016-08-08 18:16:17 +00:00
|
|
|
runStage('load pipeline') {
|
|
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
2016-10-25 11:16:12 +00:00
|
|
|
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
|
2016-06-29 13:58:48 +00:00
|
|
|
}
|
|
|
|
|
2016-08-08 18:16:17 +00:00
|
|
|
pipeDefault() {
|
2017-07-26 14:50:32 +00:00
|
|
|
if (env.BRANCH_NAME != 'master') {
|
|
|
|
runStage('compile') {
|
|
|
|
withGithubPrivkey {
|
|
|
|
sh 'make wc_compile'
|
|
|
|
}
|
2016-08-12 12:40:18 +00:00
|
|
|
}
|
2017-07-26 14:50:32 +00:00
|
|
|
runStage('lint') {
|
|
|
|
sh 'make wc_lint'
|
|
|
|
}
|
|
|
|
runStage('xref') {
|
|
|
|
sh 'make wc_xref'
|
|
|
|
}
|
|
|
|
runStage('dialyze') {
|
2019-10-23 13:44:24 +00:00
|
|
|
withWsCache("_build/default/rebar3_21.3.8.7_plt") {
|
2017-07-26 14:50:32 +00:00
|
|
|
sh 'make wc_dialyze'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
runStage('test') {
|
|
|
|
sh "make wdeps_test"
|
2016-10-25 11:16:12 +00:00
|
|
|
}
|
2016-08-08 18:16:17 +00:00
|
|
|
}
|
2016-10-11 14:36:35 +00:00
|
|
|
runStage('make release') {
|
|
|
|
withGithubPrivkey {
|
|
|
|
sh "make wc_release"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
runStage('build image') {
|
|
|
|
sh "make build_image"
|
|
|
|
}
|
2016-06-29 13:58:48 +00:00
|
|
|
|
2016-10-11 14:36:35 +00:00
|
|
|
try {
|
2017-07-26 14:50:32 +00:00
|
|
|
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic')) {
|
2016-10-11 14:36:35 +00:00
|
|
|
runStage('push image') {
|
|
|
|
sh "make push_image"
|
2016-08-12 17:33:39 +00:00
|
|
|
}
|
2016-08-08 18:16:17 +00:00
|
|
|
}
|
2016-10-11 14:36:35 +00:00
|
|
|
} finally {
|
|
|
|
runStage('rm local image') {
|
|
|
|
sh 'make rm_local_image'
|
2016-08-08 18:16:17 +00:00
|
|
|
}
|
2016-06-29 13:58:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|