Jenkins testing fixes

This commit is contained in:
Juan Ferrer 2019-01-26 14:51:36 +01:00
parent 4ee7ed099e
commit 21e3fe9fc9
1 changed files with 23 additions and 15 deletions

38
Jenkinsfile vendored
View File

@ -15,18 +15,6 @@ pipeline {
environment {
FIREFOX_BIN = "firefox/firefox-bin"
}
stage('Test') {
// apt-get update
// apt-get install libgtk-3-0 libdbus-glib-1-2 xvfb
// wget https://ftp.mozilla.org/pub/firefox/releases/64.0.2/linux-x86_64/en-US/firefox-64.0.2.tar.bz2
// tar xvjf firefox-64.0.2.tar.bz2
// rm firefox-64.0.2.tar.bz2
sh "karma start"
sh "gulp docker"
sh "gulp backendUnitTest --junit"
sh "docker rm -f salix-db"
}
stage('Checkout') {
steps {
script {
@ -60,9 +48,6 @@ pipeline {
}
}
stage('Build') {
environment {
CREDS = credentials('docker-registry')
}
steps {
nodejs('node-lts') {
withEnv(['NODE_ENV=']) {
@ -71,6 +56,29 @@ pipeline {
}
sh 'gulp build'
}
}
}
stage('Test') {
// apt-get update
// apt-get install libgtk-3-0 libdbus-glib-1-2 xvfb
// wget https://ftp.mozilla.org/pub/firefox/releases/64.0.2/linux-x86_64/en-US/firefox-64.0.2.tar.bz2
// tar xvjf firefox-64.0.2.tar.bz2
// rm firefox-64.0.2.tar.bz2
steps {
withEnv(['NODE_ENV=']) {
sh "karma start"
sh "gulp docker"
sh "gulp backendUnitTest --junit"
sh "docker rm -f salix-db"
}
}
}
stage('Docker') {
environment {
CREDS = credentials('docker-registry')
}
steps {
sh 'docker login --username $CREDS_USR --password $CREDS_PSW $REGISTRY'
sh 'docker-compose build --parallel'
sh 'docker-compose push'