Commit 33b3ee9f authored by lukasburgey's avatar lukasburgey
Browse files

Make CD restart the client services

parent c4446df3
Pipeline #93015 passed with stages
in 1 minute and 43 seconds
......@@ -21,6 +21,7 @@ build:
paths:
- feudalClient
# this needs a volume mounted to the docker runner like so:
# volumes = ["/path/to/binaries:/deployDestination:rw"]
deploy-dev:
......@@ -31,10 +32,19 @@ deploy-dev:
name: dev
dependencies:
- build
before_script:
- apk add openssh
- mkdir -p ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 600 -R ~/.ssh
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
script:
- mkdir -p /deployDestination/dev
- cp feudalClient /deployDestination/dev
- date -Iseconds > /deployDestination/dev/lastCIDeploy
# -tt to force pseudo-terminal allocation (as sudo requires a tty)
- ssh -tt ${DEPLOYMENT_USER}@${DEPLOYMENT_HOST} sudo systemctl restart ${DEPLOYMENT_SERVICE_DEV}
# this needs a volume mounted to the docker runner like so:
# volumes = ["/path/to/binaries:/deployDestination:rw"]
......@@ -46,6 +56,15 @@ deploy-master:
name: master
dependencies:
- build
before_script:
- apk add openssh
- mkdir -p ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 600 -R ~/.ssh
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
script:
- cp feudalClient /deployDestination
- date -Iseconds > /deployDestination/lastCIDeploy
# -tt to force pseudo-terminal allocation (as sudo requires a tty)
- ssh -tt ${DEPLOYMENT_USER}@${DEPLOYMENT_HOST} sudo systemctl restart ${DEPLOYMENT_SERVICE_MASTER}
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