2023-02-17 12:19:49 +00:00
|
|
|
npm-build:
|
|
|
|
|
stage: build
|
2026-05-11 10:48:38 +02:00
|
|
|
image: node:24
|
2023-02-17 12:19:49 +00:00
|
|
|
before_script:
|
2023-05-26 12:42:29 +00:00
|
|
|
- npm config set @ldc-web:registry https://${CI_SERVER_HOST}/api/v4/packages/npm/
|
|
|
|
|
- npm config set -- '//${CI_SERVER_HOST}/api/v4/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
|
2026-05-07 15:26:04 +02:00
|
|
|
- npm config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/
|
|
|
|
|
- npm config set -- '//${CI_SERVER_HOST}/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${CI_DEPLOY_PASSWORD}"
|
2023-02-17 12:19:49 +00:00
|
|
|
- npm install
|
|
|
|
|
cache:
|
|
|
|
|
paths:
|
2023-12-19 10:08:27 +00:00
|
|
|
- public/
|
2023-02-17 12:19:49 +00:00
|
|
|
script:
|
|
|
|
|
- npm run prod
|
|
|
|
|
artifacts:
|
|
|
|
|
expose_as: 'front-build'
|
|
|
|
|
paths:
|
2023-12-19 10:08:27 +00:00
|
|
|
- public/
|
2023-02-17 12:19:49 +00:00
|
|
|
allow_failure: false
|
2023-03-02 17:26:23 +00:00
|
|
|
dependencies:
|
|
|
|
|
- npm-security
|
2023-03-02 17:24:55 +00:00
|
|
|
needs:
|
|
|
|
|
- job: npm-security
|
|
|
|
|
optional: true
|
2023-02-17 12:19:49 +00:00
|
|
|
rules:
|
2023-03-03 14:18:27 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH == "trunk" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "main"
|
2023-03-02 17:29:29 +00:00
|
|
|
- if: $CI_COMMIT_TAG != null
|