diff --git a/Jenkinsfile b/Jenkinsfile index dd4d2b2ecb..1fa6a49ea4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,8 +48,8 @@ pipeline { } steps { nodejs('node-lts') { - sh 'npm install --no-audit' - sh 'gulp install' + sh 'npm install --no-audit --prefer-offline' + sh 'gulp install --ci' } } } diff --git a/gulpfile.js b/gulpfile.js index dc95c24bee..ea99f0c6fe 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -240,14 +240,15 @@ function install() { const install = require('gulp-install'); const print = require('gulp-print'); + let npmArgs = []; + if (argv.ci) npmArgs = ['--no-audit', '--prefer-offline']; + let packageFiles = ['front/package.json', 'print/package.json']; return gulp.src(packageFiles) .pipe(print(filepath => { return `Installing packages in ${filepath}`; })) - .pipe(install({ - npm: ['--no-package-lock'] - })); + .pipe(install({npm: npmArgs})); } install.description = `Installs node dependencies in all directories`;