From 3f690a6b74db667479ce2a3d6b6bf2ee88985c05 Mon Sep 17 00:00:00 2001 From: primakov Date: Fri, 29 Mar 2024 10:17:42 +0300 Subject: [PATCH] update common jenkins scripts --- Jenkinsfile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 68e3c85..225989f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent { docker { - image 'node:14' + image 'node:18' } } @@ -10,19 +10,25 @@ pipeline { steps { sh 'node -v' sh 'npm -v' - sh 'npm install' + sh 'npm ci' } } stage('eslint') { steps { - sh 'npm run eslint' + sh 'npm run eslint || npm run lint' + } + } + + stage('test') { + steps { + sh 'npm t' } } stage('build') { steps { - sh 'npm run build' + sh 'npm run build:prod' } }