Skip to content
Snippets Groups Projects
Commit d37d93ba authored by Mathias Goebel's avatar Mathias Goebel :reminder_ribbon:
Browse files

Merge branch 'develop' into 'main'

Release

See merge request !36
parents c19bf3c3 80f875b0
No related branches found
No related tags found
1 merge request!36Release
Pipeline #215433 passed
...@@ -33,6 +33,12 @@ ...@@ -33,6 +33,12 @@
paths: paths:
- public/ - public/
.ssh-config: &ssh
- which ssh-agent
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
cache: cache:
paths: paths:
...@@ -55,6 +61,7 @@ variables: ...@@ -55,6 +61,7 @@ variables:
stages: stages:
- pre-build - pre-build
- build - build
- deploy_to_server
- pages - pages
- preserve-pages - preserve-pages
- remove_unused_envs - remove_unused_envs
...@@ -96,6 +103,34 @@ build_page-main-backend: ...@@ -96,6 +103,34 @@ build_page-main-backend:
VUE_APP_PUBLIC_PATH: "${BASE_BACKEND}" VUE_APP_PUBLIC_PATH: "${BASE_BACKEND}"
<<: *build-defaults <<: *build-defaults
deploy-dev:
stage: deploy_to_server
image: rsamban/scp-resource:latest
only:
- develop
dependencies:
- build_page-develop-backend
script:
- *ssh
# remove the old version from dev and test
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "rm -rf ~/$CI_COMMIT_REF_NAME/frontend/website/*"
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "rm -rf ~/test/frontend/website/*"
# install new version to dev and test
- scp -o 'StrictHostKeyChecking no' -r public/$CI_COMMIT_REF_NAME/* $SSH_USER@$SSH_IP:~/$CI_COMMIT_REF_NAME/frontend/website/
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "cp -r ~/$CI_COMMIT_REF_NAME/frontend/website/* ~/test/frontend/website/"
deploy-main:
stage: deploy_to_server
image: rsamban/scp-resource:latest
only:
- main
dependencies:
- build_page-main-backend
script:
- *ssh
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "rm -rf ~/$CI_COMMIT_REF_NAME/frontend/website/*"
- scp -o 'StrictHostKeyChecking no' -r public/$CI_COMMIT_REF_NAME/* $SSH_USER@$SSH_IP:~/$CI_COMMIT_REF_NAME/frontend/website/
# this stage creates a new environment for the current branch. # this stage creates a new environment for the current branch.
pages: pages:
......
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