[JENKINS-54204] Make sure to install exactly the same dependencies

This commit is contained in:
Adrien Lecharpentier 2018-10-23 15:23:14 +02:00
parent d1fd35b1ce
commit d90e6ac06c
No known key found for this signature in database
GPG Key ID: 314CDD1BFD68EFF1
5 changed files with 6 additions and 6 deletions

View File

@ -23,9 +23,9 @@ update-package-locks:
# https://npm.community/t/some-packages-have-dist-tarball-as-http-and-not-https/285/13
rm -rf services/node_modules/ services/package-lock.json && \
rm -rf distribution/client/node_modules/ distribution/client/package-lock.json && \
cd services/ && $(NODE) npm install && \
cd services/ && $(NODE) npm ci && \
sed -i 's/"resolved": "http:/"resolved": "https:/g' package-lock.json && \
cd ../distribution/client && $(NODE) npm install && \
cd ../distribution/client && $(NODE) npm ci && \
sed -i 's/"resolved": "http:/"resolved": "https:/g' package-lock.json
npm-audit-fix:

View File

@ -46,7 +46,7 @@ prepare-distribution: build/jenkins-support build/jenkins.sh
# Once the tree has been put into place, node_modules must be generated for
# the distribution
(cd $(DIST_DIR)/client && $(ROOT_DIR)/tools/npm install --production)
(cd $(DIST_DIR)/client && $(ROOT_DIR)/tools/npm ci --production)
prepare-docker-cloud-distribution: prepare-distribution
mkdir -p build/evergreen-docker-cloud/evergreen

View File

@ -24,7 +24,7 @@ depends: node_modules
node_modules: package-lock.json package.json
# Checking to see if the directory exists because npm install updates the
# directory every time it runs, busting the GNU/Make cache causing rebuilds
if [ ! -d node_modules ]; then $(NODE) npm install; fi;
if [ ! -d node_modules ]; then $(NODE) npm ci; fi;
clean::
rm -rf vendor node_modules build

View File

@ -5,7 +5,7 @@ WORKDIR ${APP_DIR}
ADD package*json ${APP_DIR}/
RUN npm install
RUN npm ci
# Doing a multi-stage build to reset some stuff for a smaller image
FROM node:9-alpine

View File

@ -13,7 +13,7 @@ all: check docs container
# directory every time it runs, busting the GNU/Make cache causing rebuilds
depends: package.json
@if [ ! -d node_modules ]; then \
npm install; \
npm ci; \
fi;
docs: depends