From a617db08b94813fbcb3bbcff6884d5e7913fce2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grand?= <francois.grand@inrae.fr> Date: Tue, 28 Feb 2023 10:30:40 +0100 Subject: [PATCH] fix(ci): wrong conditions for project building refs #604 --- .gitlab-ci.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 162862386..d3502479b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -80,13 +80,8 @@ test: script: - npm run e2e -build-dev: - stage: build-dev - only: - - pushes - - tags - - schedules - - web +.build: + stage: build artifacts: expire_in: 10 min paths: @@ -94,21 +89,25 @@ build-dev: script: # -baseref option is used by npm to set the npm_config_basehref environment variable # used in package.json - - npm run build-href -basehref=/cassiopee/$CI_COMMIT_REF_NAME/ + - npm run build-href -basehref=$BASEHREF -build-prod: - stage: build-prod +build-dev: + extends: .build only: - - pushes - tags + - pushes - schedules - web - artifacts: - expire_in: 10 min - paths: - - dist/ - script: - - npm run build + variables: + - BASEHREF=/cassiopee/$CI_COMMIT_REF_NAME/ + +build-prod: + extends: .build + only: + - tags + - devel + variables: + - BASEHREF=/ clean-stale-branches: stage: clean-stale-branches -- GitLab