GitLab steht wegen Wartungsarbeiten am Montag, den 10. Mai, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Adds deploy step for the beta server

parent c6c3e347
...@@ -3,6 +3,7 @@ stages: ...@@ -3,6 +3,7 @@ stages:
- test - test
- build - build
- deploy - deploy
- deploy-beta
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
...@@ -37,6 +38,7 @@ build: ...@@ -37,6 +38,7 @@ build:
stage: build stage: build
only: only:
- master - master
- beta
tags: tags:
- nodejs - nodejs
script: script:
...@@ -66,7 +68,22 @@ deploy: ...@@ -66,7 +68,22 @@ deploy:
- ssh-keyscan "$STAGING_BACKEND_URL" >> ~/.ssh/known_hosts - ssh-keyscan "$STAGING_BACKEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY") - ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
- rsync -rltgoDqv --delete -e "ssh" dist/* "$STAGING_BACKEND_SSH_URL" - rsync -rltgoDqv --delete -e "ssh" dist/* "$STAGING_BACKEND_SSH_URL"
- rsync -rltgoDqv --delete -e "ssh" dist/* "$BETA_BACKEND_SSH_URL"
- ssh $NEW_PRODUCTION_SSH 'touch /home/arsnova/arsnova.click-v2/backend/deploy.touch' - ssh $NEW_PRODUCTION_SSH 'touch /home/arsnova/arsnova.click-v2/backend/deploy.touch'
deploy-beta:
stage: deploy-beta
only:
- beta
tags:
- rsync
dependencies:
- build
script:
- chmod -R a+rX,ug+w .
- eval $(ssh-agent -s)
- mkdir ~/.ssh
- ssh-keyscan "$STAGING_BACKEND_URL" >> ~/.ssh/known_hosts
- ssh-add <(echo "$STAGING_SSH_PRIVATE_KEY")
- rsync -rltgoDqv --delete -e "ssh" dist/* "$BETA_BACKEND_SSH_URL"
- ssh $NEW_PRODUCTION_SSH 'touch /home/arsnova/arsnova.click-v2-beta/backend/deploy.touch' - ssh $NEW_PRODUCTION_SSH 'touch /home/arsnova/arsnova.click-v2-beta/backend/deploy.touch'
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