2016-09-05 12:21:44 +00:00
|
|
|
#!groovy
|
2017-05-26 09:18:44 +00:00
|
|
|
// -*- mode: groovy -*-
|
2016-09-05 12:21:44 +00:00
|
|
|
|
|
|
|
def finalHook = {
|
|
|
|
runStage('store CT logs') {
|
|
|
|
archive '_build/test/logs/'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
build('capi', 'docker-host', finalHook) {
|
|
|
|
checkoutRepo()
|
|
|
|
loadBuildUtils()
|
|
|
|
|
|
|
|
def pipeDefault
|
2017-02-28 12:26:14 +00:00
|
|
|
def withWsCache
|
2016-09-05 12:21:44 +00:00
|
|
|
runStage('load pipeline') {
|
|
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
2017-02-28 12:26:14 +00:00
|
|
|
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
|
2016-09-05 12:21:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pipeDefault() {
|
2017-11-08 13:44:34 +00:00
|
|
|
if (!env.BRANCH_NAME.matches('^v\\d+')) {
|
2017-05-26 15:01:51 +00:00
|
|
|
runStage('compile') {
|
|
|
|
withGithubPrivkey {
|
|
|
|
sh 'make wc_compile'
|
|
|
|
}
|
2016-09-05 12:21:44 +00:00
|
|
|
}
|
2017-05-26 15:01:51 +00:00
|
|
|
runStage('lint') {
|
|
|
|
sh 'make wc_lint'
|
|
|
|
}
|
|
|
|
runStage('xref') {
|
|
|
|
sh 'make wc_xref'
|
|
|
|
}
|
|
|
|
runStage('dialyze') {
|
2018-05-07 15:50:57 +00:00
|
|
|
withWsCache("_build/default/rebar3_19.3_plt") {
|
2017-05-26 15:01:51 +00:00
|
|
|
sh 'make wc_dialyze'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
runStage('test') {
|
2018-09-17 14:02:41 +00:00
|
|
|
sh "make wc_test"
|
2017-02-28 12:26:14 +00:00
|
|
|
}
|
2016-10-11 23:42:05 +00:00
|
|
|
}
|
2017-05-26 15:01:51 +00:00
|
|
|
|
2016-09-05 12:21:44 +00:00
|
|
|
runStage('make release') {
|
|
|
|
withGithubPrivkey {
|
|
|
|
sh "make wc_release"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
runStage('build image') {
|
|
|
|
sh "make build_image"
|
|
|
|
}
|
2016-10-11 23:42:05 +00:00
|
|
|
|
2016-09-07 12:06:55 +00:00
|
|
|
try {
|
2017-11-08 13:44:34 +00:00
|
|
|
if (env.BRANCH_NAME.startsWith('epic') || env.BRANCH_NAME.matches('^v\\d+')) {
|
2016-09-07 12:06:55 +00:00
|
|
|
runStage('push image') {
|
|
|
|
sh "make push_image"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} finally {
|
|
|
|
runStage('rm local image') {
|
|
|
|
sh 'make rm_local_image'
|
2016-09-05 12:21:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-09-07 12:06:55 +00:00
|
|
|
|
2017-05-26 15:01:51 +00:00
|
|
|
|