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

fix(ci): do not update index.html href in case of deployment of a stable version on aubes

refs #540
parent fb29ec90
No related branches found
No related tags found
1 merge request!142Resolve "Path error in stable deployment version on the dev server"
Pipeline #139608 passed
......@@ -119,7 +119,7 @@ deploy-dev:
script:
# Copie de la branche / du tag
- if [[ $CI_COMMIT_REF_NAME != "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH; fi
- if [[ $CI_COMMIT_REF_NAME == "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH/stable; fi
- if [[ $CI_COMMIT_REF_NAME == "stable" ]]; then ./scripts/deploy-version.sh $CI_COMMIT_REF_NAME $DEV_LOGIN $DEV_HOST $DEV_PATH/stable 0; fi
deploy-prod:
stage: deploy-prod
......@@ -129,7 +129,7 @@ deploy-prod:
dependencies:
- build
script:
- ./scripts/deploy-version.sh stable $PROD_LOGIN $PROD_HOST $PROD_PATH $PROD_PASS
- ./scripts/deploy-version.sh stable $PROD_LOGIN $PROD_HOST $PROD_PATH 1 $PROD_PASS
releases-nightly:
stage: releases-nightly
......
......@@ -14,7 +14,8 @@ VERSION="$1"
LOGIN="$2"
HOST="$3"
DIR="$4"
PASS="$5"
UPDATE_INDEX=$5
PASS="$6"
echo "$(basename $0): deploying version $VERSION in $LOGIN@$HOST:$DIR"
......@@ -22,9 +23,11 @@ if [[ $VERSION == "stable" ]]; then
# Copie de la branche production
rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" dist/ ${LOGIN}@${HOST}:${DIR}/
# Modification du dossier base href
echo "updating index.html"
ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html"
if (( $UPDATE_INDEX == 1 )); then
# Modification du dossier base href
echo "updating index.html"
ssh $LOGIN@$HOST "sed -i 's:/cassiopee/stable/:/:g' $DIR/index.html"
fi
else
# Copie de la branche / du tag
rsync -a --delete --exclude=cassiopee-releases -e "ssh -o StrictHostKeyChecking=no" "dist/" "$LOGIN@$HOST:$DIR/$VERSION"
......
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