fix: replace `npm install` by `npm ci` to get deterministic builds (#54)

* fix: replace `npm install` by `npm ci` to get deterministic builds

* no need to upgrade npm in the Makefile, npm ci already existing in node 10 image

* use postgresql version 10 in docker-compose for tests like the 'produplink' database currently used in production
This commit is contained in:
Hervé Le Meur 2023-10-30 14:08:20 +01:00 committed by GitHub
parent 746f37ce58
commit 3a9d66c648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -1,11 +1,14 @@
FROM node:9 as builder
RUN npm install --global npm@5.7.0 && \
npm version
ARG APP_DIR=/srv/uplink
WORKDIR ${APP_DIR}
COPY 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

@ -30,7 +30,7 @@ version:
npm version
depends: version package.json package-lock.json ## Install node dependencies
if [ ! -d node_modules ]; then npm install; fi;
if [ ! -d node_modules ]; then npm ci; fi;
build: depends ## Compile TypeScript
$(TSC)

View File

@ -1,7 +1,7 @@
version: '3'
services:
db:
image: postgres:alpine
image: postgres:10-alpine
environment:
- 'POSTGRES_PASSWORD=jenkinsuplink'
# Used for psql non-interactive scripting