diff --git a/Jenkinsfile b/Jenkinsfile index 978797b..8d4d8c2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,6 @@ pipeline { test -f frontend/package-lock.json test -f deploy/dev/docker-compose.yml - echo "Commit : ${GIT_COMMIT}" echo "Tag Docker : ${IMAGE_TAG}" ''' } @@ -75,16 +74,22 @@ pipeline { docker run --rm \ --network "${CI_NETWORK}" \ --volumes-from furious-jenkins \ + -v tiptop-npm-cache-backend:/npm-cache \ --user "$(id -u):$(id -g)" \ -e HOME=/tmp \ - -e NPM_CONFIG_CACHE=/tmp/.npm \ + -e NODE_OPTIONS=--dns-result-order=ipv4first \ + -e NPM_CONFIG_CACHE=/npm-cache \ + -e NPM_CONFIG_FETCH_RETRIES=5 \ + -e NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=20000 \ + -e NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=120000 \ + -e NPM_CONFIG_FETCH_TIMEOUT=600000 \ -e DATABASE_URL="${DATABASE_URL}" \ -e JWT_SECRET=jenkins_ci_secret \ -e NODE_ENV=test \ -w "${WORKSPACE}/backend" \ node:22-alpine \ sh -c " - npm ci && + npm ci --prefer-offline --no-audit --no-fund && npx prisma generate && npx prisma migrate deploy && npm test @@ -98,13 +103,19 @@ pipeline { sh ''' docker run --rm \ --volumes-from furious-jenkins \ + -v tiptop-npm-cache-frontend:/npm-cache \ --user "$(id -u):$(id -g)" \ -e HOME=/tmp \ - -e NPM_CONFIG_CACHE=/tmp/.npm \ + -e NODE_OPTIONS=--dns-result-order=ipv4first \ + -e NPM_CONFIG_CACHE=/npm-cache \ + -e NPM_CONFIG_FETCH_RETRIES=5 \ + -e NPM_CONFIG_FETCH_RETRY_MINTIMEOUT=20000 \ + -e NPM_CONFIG_FETCH_RETRY_MAXTIMEOUT=120000 \ + -e NPM_CONFIG_FETCH_TIMEOUT=600000 \ -w "${WORKSPACE}/frontend" \ node:22-alpine \ sh -c " - npm ci && + npm ci --prefer-offline --no-audit --no-fund && npm run lint && npm run build "