From dc724eae92c3e62cdbfed42e8b873fc2f0eed874 Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 10 Jul 2018 16:42:52 +0100 Subject: [PATCH] Try with parallel tests --- services/web/Jenkinsfile | 58 +++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/services/web/Jenkinsfile b/services/web/Jenkinsfile index 7b44d70315..721ede90a8 100644 --- a/services/web/Jenkinsfile +++ b/services/web/Jenkinsfile @@ -67,15 +67,38 @@ pipeline { } } - stage('Unit Test') { - agent { - docker { - image 'node:6.9.5' - reuseNode true + stage('Test and Minify') { + parallel { + stage('Unit Test') { + agent { + docker { + image 'node:6.9.5' + reuseNode true + } + } + steps { + sh 'make --no-print-directory test_unit MOCHA_ARGS="--reporter tap"' + } + } + + stage('Acceptance Test') { + steps { + // Spawns its own docker containers + sh 'make --no-print-directory test_acceptance MOCHA_ARGS="--reporter tap"' + } + } + + stage('Minify') { + agent { + docker { + image 'node:6.9.5' + reuseNode true + } + } + steps { + sh 'WEBPACK_ENV=production make minify' + } } - } - steps { - sh 'make --no-print-directory test_unit MOCHA_ARGS="--reporter tap"' } } @@ -86,25 +109,6 @@ pipeline { } } - stage('Acceptance Test') { - steps { - // Spawns its own docker containers - sh 'make --no-print-directory test_acceptance MOCHA_ARGS="--reporter tap"' - } - } - - stage('Minify') { - agent { - docker { - image 'node:6.9.5' - reuseNode true - } - } - steps { - sh 'WEBPACK_ENV=production make minify' - } - } - stage('Package') { steps { sh 'rm -rf ./node_modules/grunt*'