Skip to content
Snippets Groups Projects
Commit c645eaae authored by François Grand's avatar François Grand
Browse files

fix(ci): use linked jalhyd branch to name CI cache

refs #526
parent 335f07ad
No related branches found
No related tags found
No related merge requests found
Pipeline #139449 failed
......@@ -17,6 +17,7 @@ variables:
DEPLOY_URL: "/var/www/html/cassiopee"
DEPLOY_STABLE_URL: "/var/www/cassiopee-production"
RELEASES_URL: "$DEPLOY_STABLE_URL/cassiopee-releases"
JALHYD_BRANCH: "$(scripts/get_jalhyd_branch_name.sh $CI_COMMIT_REF_NAME)"
before_script:
# load private key from GitLab CI variable, to deploy on Aubes server
......@@ -26,6 +27,7 @@ before_script:
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
cache:
key: $JALHYD_BRANCH
paths:
- node_modules/
......@@ -37,10 +39,7 @@ jalhyd:
- schedules
- web
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"
- cd ..
- rm -rf jalhyd
......
#!/bin/bash
# get jalhyd branch linked to current nghyd branch.
# input parameter : nghyd branch name
# return jalhyd branch name
if (( $# != 1 )); then
echo "syntax : $(basename $0) <nghyd branch name>" >&2
exit 1
fi
nghyd_branch=$1
jalhyd_branch=`cat jalhyd_branch`
if [[ "$nghyd_branch" = "master" ]]; then jalhyd_branch="master"; fi
if [[ "$nghyd_branch" = "devel" ]]; then jalhyd_branch="devel"; fi
echo $jalhyd_branch
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