Skip to content
Snippets Groups Projects
Commit 069e1b05 authored by Nils Windisch's avatar Nils Windisch :coffee:
Browse files

Merge branch 'develop' into kvoigt1-develop-patch-16455

* develop:
  ci: add build and deployment for test instane
  Bugfix/test deployment
  ci: add build and deploy for test
parents a46dce09 4bf929e6
No related branches found
No related tags found
1 merge request!90update src/imprint.md
Pipeline #226407 passed with warnings
...@@ -52,6 +52,8 @@ variables: ...@@ -52,6 +52,8 @@ variables:
GIT_DEPTH: 2 GIT_DEPTH: 2
MAIN: 'https://ahikar.sub.uni-goettingen.de' MAIN: 'https://ahikar.sub.uni-goettingen.de'
DEVELOP: 'https://ahikar-dev.sub.uni-goettingen.de' DEVELOP: 'https://ahikar-dev.sub.uni-goettingen.de'
TEST: 'https://ahikar-test.sub.uni-goettingen.de'
API_TEST: 'https://ahikar-test.sub.uni-goettingen.de/api'
API_DEV: 'https://ahikar-dev.sub.uni-goettingen.de/api' API_DEV: 'https://ahikar-dev.sub.uni-goettingen.de/api'
API_MAIN: 'https://ahikar.sub.uni-goettingen.de/api' API_MAIN: 'https://ahikar.sub.uni-goettingen.de/api'
BASE_BACKEND: '/website/' BASE_BACKEND: '/website/'
...@@ -84,6 +86,14 @@ build_page-all: ...@@ -84,6 +86,14 @@ build_page-all:
VUE_APP_PUBLIC_PATH: '/ahiqar/website/${CI_COMMIT_REF_SLUG}/' VUE_APP_PUBLIC_PATH: '/ahiqar/website/${CI_COMMIT_REF_SLUG}/'
<<: *build-defaults <<: *build-defaults
build_page-test-backend:
variables:
VUE_APP_BASE_URL_API: "${API_TEST}"
VUE_APP_BASE_URL_VIEWER: "${TEST}"
VUE_APP_PUBLIC_PATH: "${BASE_BACKEND}"
<<: *build-defaults
build_page-develop-backend: build_page-develop-backend:
only: only:
- develop - develop
...@@ -102,29 +112,45 @@ build_page-main-backend: ...@@ -102,29 +112,45 @@ build_page-main-backend:
VUE_APP_PUBLIC_PATH: "${BASE_BACKEND}" VUE_APP_PUBLIC_PATH: "${BASE_BACKEND}"
<<: *build-defaults <<: *build-defaults
deploy-test:
stage: deploy_to_server
image: rsamban/scp-resource:latest
except:
- develop
- main
needs:
- job: build_page-test-backend
artifacts: true
script:
- *ssh
# remove the old version from test
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "rm -rf ~/test/frontend/website/*"
# install new version to test
- scp -o 'StrictHostKeyChecking no' -r public/$CI_COMMIT_REF_SLUG/* $SSH_USER@$SSH_IP:~/test/frontend/website/
deploy-dev: deploy-dev:
stage: deploy_to_server stage: deploy_to_server
image: rsamban/scp-resource:latest image: rsamban/scp-resource:latest
only: only:
- develop - develop
dependencies: needs:
- build_page-develop-backend - job: build_page-develop-backend
artifacts: true
script: script:
- *ssh - *ssh
# remove the old version from dev and test # remove the old version from dev
- 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 ~/$CI_COMMIT_REF_NAME/frontend/website/*"
- ssh -o 'StrictHostKeyChecking no' $SSH_USER@$SSH_IP "rm -rf ~/test/frontend/website/*" # install new version to dev
# 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/ - 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: deploy-main:
stage: deploy_to_server stage: deploy_to_server
image: rsamban/scp-resource:latest image: rsamban/scp-resource:latest
only: only:
- main - main
dependencies: needs:
- build_page-main-backend - job: build_page-main-backend
artifacts: true
script: script:
- *ssh - *ssh
- 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 ~/$CI_COMMIT_REF_NAME/frontend/website/*"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment