Commit ed187501 authored by Tom Käsler's avatar Tom Käsler

Merge branch 'fix-stop-review' into 'staging'

Adjust review deployment handling to fix stop action

See merge request arsnova/cards!71
parents 29dbdce6 eb8d6485
...@@ -108,10 +108,10 @@ chimp: ...@@ -108,10 +108,10 @@ chimp:
review: review:
stage: review stage: review
script: script:
# Generate port by using all digits in branch name till "-" is found # Extract ID by using all digits in branch name till "-" is found
- METEOR_PORT=$(($(echo $CI_BUILD_REF_NAME | cut -f1 -d '-') + 10000)) - REVIEW_ID=$(echo $CI_BUILD_REF_NAME | cut -f1 -d '-')
# Set a variable that points to the appo directory # Set a variable that points to the app directory
- METEOR_HOME=/srv/review-apps/$METEOR_PORT - METEOR_HOME=/srv/review-apps/$REVIEW_ID
# Make app directory # Make app directory
- mkdir -p $METEOR_HOME/app - mkdir -p $METEOR_HOME/app
# Copy meteor settings into app directory # Copy meteor settings into app directory
...@@ -124,7 +124,7 @@ review: ...@@ -124,7 +124,7 @@ review:
- rsync -aqv --delete "$DB_TEST_DUMP/"* $METEOR_HOME/dbdump - rsync -aqv --delete "$DB_TEST_DUMP/"* $METEOR_HOME/dbdump
# Call script to setup everything # Call script to setup everything
# First parameter is a unique port, second is used to generate the subdomain and the third points to the dbdump directory # First parameter is a unique port, second is used to generate the subdomain and the third points to the dbdump directory
- /srv/review-apps/review-app-setup.sh $METEOR_PORT $CI_PIPELINE_ID $METEOR_HOME/dbdump - /srv/review-apps/review-app-setup.sh $REVIEW_ID $CI_PIPELINE_ID $METEOR_HOME/dbdump
environment: environment:
name: review/$CI_BUILD_REF_NAME name: review/$CI_BUILD_REF_NAME
url: http://$CI_PIPELINE_ID.review.arsnova.cards/ url: http://$CI_PIPELINE_ID.review.arsnova.cards/
...@@ -140,8 +140,10 @@ review: ...@@ -140,8 +140,10 @@ review:
stop_review: stop_review:
stage: review stage: review
script: script:
- METEOR_PORT=$(echo $CI_BUILD_REF_NAME | cut -f1 -d '-')0 # Extract ID by using all digits in branch name till "-" is found
- METEOR_HOME=/srv/review-apps/$METEOR_PORT - REVIEW_ID=$(echo $CI_BUILD_REF_NAME | cut -f1 -d '-')
# Set a variable that points to the app directory
- METEOR_HOME=/srv/review-apps/$REVIEW_ID
- cd $METEOR_HOME - cd $METEOR_HOME
- ./appctl.sh stop - ./appctl.sh stop
- cd /srv/review-apps - cd /srv/review-apps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment