Skip to content
Snippets Groups Projects
Commit f61e413e authored by Fabian Nuraddin Alexander Gabel's avatar Fabian Nuraddin Alexander Gabel :speech_balloon:
Browse files

deploy-on-tuhh for dev branch testing

parent 7ad35445
No related branches found
No related tags found
3 merge requests!84Draft: Resolve "create tests for new commandline arguments",!83Draft: Resolve "deliver css and javascript to www3",!77Resolve "tuhh-deployment"
Pipeline #105442 failed
......@@ -230,27 +230,24 @@ deploy-on-tuhh:
before_script:
## install dependencies
- apk update && apk add openssh-client bash
## see https://docs.gitlab.com/ee/ci/ssh_keys/ for comments
#- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- eval $(ssh-agent -s)
- echo "$TUHH_SSH_KEY" | tr -d '\r' | ssh-add -
- echo "$REVIEW_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh && touch ~/.ssh/known_hosts
- echo "$TUHH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 700 ~/.ssh
- echo "$REVIEW_SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 700 ~/.ssh/known_hosts
script:
- mkdir -p .public-tuhh
- cp -r build-tuhh/*.html .public-tuhh
- mv .public-tuhh public-tuhh
- echo "Deploying on www3-dev.tuhh.de"
# deploy webpage on tuhh
- echo 'scp -v public-tuhh' "$TUHH_USER@$TUHH_HOST:$TUHH_DEPLOY"
- scp -v -r public-tuhh "$TUHH_USER@$TUHH_HOST:$TUHH_DEPLOY"
#- rsync -v -r -a --delete -e "ssh" build-tuhh/* $TUHH_USER@$TUHH_HOST:$TUHH_DEPLOY/tes
- ssh -v -p "${REVIEW_SSH_PORT}" "${REVIEW_SSH_USER}"@"${REVIEW_HOST_NAME}" "mkdir -p /usr/local/apache2/htdocs/~dev
- scp -v -P "${REVIEW_SSH_PORT}" -r build-tuhh/* "${REVIEW_SSH_USER}"@"${REVIEW_HOST_NAME}":"/usr/local/apache2/htdocs/~dev
artifacts:
paths:
- public-tuhh
- build-tuhh
rules:
- if: $CI_PROJECT_URL != 'https://collaborating.tuhh.de/cfg0846/research-topics-mat-tuhh'
when: never
- if: $CI_COMMIT_BRANCH == 'dev'
- if: $CI_COMMIT_BRANCH != 'dev'
when: always
# deploy static webpage to web-server via GitLab 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