diff --git a/Jenkinsfile b/Jenkinsfile index 642f5271ca14affd54cda397e850fd3a0292218f..6aca2f2de3bbd9141b358c46a5b10a604e99f99f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,14 +5,14 @@ podTemplate(label: label, ], volumes: [ - persistentVolumeClaim(mountPath: 'home/jenkins/workspace', claimName: 'pvc', readOnly: false) + persistentVolumeClaim(mountPath: 'home/jenkins/workspace/${JOB_NAME}/npm-cache', claimName: 'pvc', readOnly: false) ]) { node(label) { stage('Build a Node project') { git 'https://gitlab.mynisum.com/amenaafreen/node-app-test1.git' container('node') { - sh 'npm config set cache home/jenkins/workspace/${JOB_NAME}/npm-cache --global && npm install' + sh 'npm config set cache home/jenkins/workspace/${JOB_NAME}/npm-cache && npm install' } } }