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() {
|
|
|
|
runStage('compile') {
|
|
|
|
withGithubPrivkey {
|
|
|
|
sh 'make wc_compile'
|
|
|
|
}
|
|
|
|
}
|
2016-10-11 23:42:05 +00:00
|
|
|
runStage('lint') {
|
|
|
|
sh 'make wc_lint'
|
|
|
|
}
|
2016-09-05 12:21:44 +00:00
|
|
|
runStage('xref') {
|
|
|
|
sh 'make wc_xref'
|
|
|
|
}
|
2016-10-11 23:42:05 +00:00
|
|
|
runStage('dialyze') {
|
2017-02-28 12:26:14 +00:00
|
|
|
withWsCache("_build/default/rebar3_19.1_plt") {
|
|
|
|
sh 'make wc_dialyze'
|
|
|
|
}
|
2016-10-11 23:42:05 +00:00
|
|
|
}
|
2016-09-05 12:21:44 +00:00
|
|
|
runStage('test') {
|
|
|
|
sh "make wdeps_test"
|
|
|
|
}
|
|
|
|
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 {
|
|
|
|
if (env.BRANCH_NAME == 'master') {
|
|
|
|
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
|
|
|
|