From 52d08e5326dc6511ef1436dbde59b26973159d02 Mon Sep 17 00:00:00 2001 From: Jesse James Isler Date: Thu, 9 Jun 2022 11:12:37 +0200 Subject: [PATCH] fixed --- Jenkinsfile | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fc83c42..6041a01 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,24 +16,30 @@ pipeline { } stage('Test') { - agent { - docker { - image 'node:lts-bullseye-slim' - args '-p 3000:3000' - } - } - parallel { - stage('Static code analysis') { - steps { - unstash 'node_modules' - sh 'npm run-script lint' - } + stage('Static code analysis') { + agent { + docker { + image 'node:lts-bullseye-slim' + args '-p 3000:3000' + } } - stage('Unit tests') { - steps { - unstash 'node_modules' - sh 'npm run-script test' - } + steps { + unstash 'node_modules' + sh 'npm run-script lint' + stash includes: 'node_modules/', name: 'node_modules' + } + } + stage('Unit tests') { + agent { + docker { + image 'node:lts-bullseye-slim' + args '-p 3000:3000' + } + } + steps { + unstash 'node_modules' + sh 'npm run-script test' + stash includes: 'node_modules/', name: 'node_modules' } } }