url-shortener/Jenkinsfile
Toporkov Igor 1b31deb9f7
MSPF-396: update to erlang 21 (#13)
* MSPF-396: update to erlang 21 (#12)

* Setup to run on local machine

* Migrated to new erlang/cowboy with dependencies

* Updated dependecies & fixed wrong error handling

* Removed redundant dependecy and hid generated apps

* Removed extra cors module, added Options to handler

* Fixed middleware misplacement, and properly implemented handler behaviour

* cleaned up

* returned to url instead of http in private repos

* Returned to using cowboy_cors as CORS app, fixed typing, added epic branches rules for Jenkins

* added missing dependency, divided net_opts option

* Updated cors policy, added cors tests

* Reverted unnessesary Jenkinsfile changes

* Suppresed jesse warnings

* Updated build image tag

* Switched to using new jesse and parse_trans

* Bumped utils and image tags, updated registry

* bumped base image

* bumped build_utils, removed registry redefinition

* Refreshed outdated config (#14)

* bumped erlang-health, fixed lager crash

* Upgraded lager, restored redirection, refreshed config

* Refreshed deprecated ranch opts passing

* Switched to master branches

* Bumped build image
2019-04-03 17:20:56 +03:00

66 lines
1.3 KiB
Groovy

#!groovy
// -*- mode: groovy -*-
def finalHook = {
runStage('store CT logs') {
archive '_build/test/logs/'
}
}
build('url-shortener', 'docker-host', finalHook) {
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")
}
pipeDefault() {
if (env.BRANCH_NAME != 'master') {
runStage('compile') {
withGithubPrivkey {
sh 'make wc_compile'
}
}
runStage('lint') {
sh 'make wc_lint'
}
runStage('xref') {
sh 'make wc_xref'
}
runStage('dialyze') {
withWsCache("_build/default/rebar3_21.1.1_plt") {
sh 'make wc_dialyze'
}
}
runStage('test') {
sh "make wdeps_test"
}
}
runStage('make release') {
withGithubPrivkey {
sh "make wc_release"
}
}
runStage('build image') {
sh "make build_image"
}
try {
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic')) {
runStage('push image') {
sh "make push_image"
}
}
} finally {
runStage('rm local image') {
sh 'make rm_local_image'
}
}
}
}