diff --git a/Jenkinsfile b/Jenkinsfile index ec61639f3..197cc63b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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'