Skip to content
Snippets Groups Projects
Commit c33755ee authored by David Dorchies's avatar David Dorchies
Browse files

Merge branch '630-ci-change-cache-strategy-for-node-modules' into 'devel'

Resolve "CI: change cache strategy for node modules"

Closes #630

See merge request !230
parents 1a3111e3 7d35dfe4
No related branches found
No related tags found
1 merge request!230Resolve "CI: change cache strategy for node modules"
Pipeline #143633 passed
......@@ -9,7 +9,7 @@ stages:
- releases-version
default:
tags: [mia2]
tags: [docker]
image: geaucassiopee/ci-cd-cross-platform-webapp:v3
variables:
......@@ -37,36 +37,25 @@ before_script:
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
cache:
key:
files:
- jalhyd_branch
- package.json
paths:
- node_modules/
- jalhyd/
install:
stage: install
only:
- pushes
- tags
- schedules
- web
artifacts:
paths:
- node_modules/
- jalhyd/
expire_in: 1 min
script:
- JALHYD_BRANCH=`cat jalhyd_branch`
- echo "CI_COMMIT_REF_NAME - $CI_COMMIT_REF_NAME"
- if [ "$CI_COMMIT_REF_NAME" = "master" ]; then JALHYD_BRANCH="master"; fi
- if [ "$CI_COMMIT_REF_NAME" = "devel" ]; then JALHYD_BRANCH="devel"; fi
- echo "Branche JalHyd - $JALHYD_BRANCH"
- rm -rf jalhyd
- git clone https://forgemia.inra.fr/cassiopee/jalhyd.git
- cd jalhyd
- git checkout "$JALHYD_BRANCH" || git checkout devel
- npm ci --force
- npm run build
- cd ..
- rm -rf node_modules
- npm ci --force --unsafe-perm
test:
......@@ -81,6 +70,8 @@ test:
.build:
stage: build
dependencies:
- install
artifacts:
expire_in: 10 min
paths:
......@@ -157,7 +148,8 @@ releases-nightly:
except:
# exclude master to apply releases-nightly on devel only
- master
dependencies: []
dependencies:
- install
script:
- ./scripts/release-version.sh nightly $PROD_LOGIN $PROD_HOST $RELEASES_PATH
......@@ -166,6 +158,7 @@ releases-version:
only:
variables:
- $CI_COMMIT_REF_NAME =~ /^[0-9]+\.[0-9]+\.[0-9]+$/ # version tag
dependencies: []
dependencies:
- install
script:
- ./scripts/release-version.sh $CI_COMMIT_REF_NAME $PROD_LOGIN $PROD_HOST $RELEASES_PATH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment