Commit b107142c authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Update .gitlab-ci.yml: Add Deploy (WIP)

parent 7ace6b78
Pipeline #44 failed
......@@ -11,6 +11,12 @@ variables:
before_script:
- apt-get update -yq
# Setup SSH deploy keys
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
test:
stage: test
......@@ -30,6 +36,17 @@ pages:
- public
only:
- master
deploy_staging:
type: deploy
environment:
name: staging
script:
- ssh medald@jim.test.bwinf.de "service medald stop && exit"
- scp target/release/medal medald@jim.test.bwinf.de:
- ssh medald@jim.test.bwinf.de "service medald start && exit"
only:
- master
cache:
paths:
......
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