dashboard/Jenkinsfile
Ivan Panteleev ac821901d5
added headless chrome and karma tests (#357)
* added headless chrome and karma tests

* Fix karma.conf.js syntax for prettier check

* fix typo, switch stages order

* fix volume bind path

* test switched to singlerun

* increased karma timeout
2021-01-13 13:19:27 +03:00

49 lines
982 B
Groovy

#!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")
}
def pipeline = {
runStage('init') {
withGithubSshCredentials {
sh 'make submodules'
withGithubToken {
sh 'make wc_init'
}
}
}
runStage('build') {
sh 'make wc_build'
}
runStage('test fe (karma.js)') {
sh 'make test'
}
runStage('build image') {
sh 'make build_image'
}
runFESecurityTools()
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)
}