Commit 8b92b73d authored by Pietro Saccardi's avatar Pietro Saccardi

Updating deploy jobs to use a specific runner.

The runner is selected via a tag. No need to specify a customized port.
parent 935bddf1
Pipeline #537 failed with stages
in 4 minutes and 45 seconds
......@@ -17,7 +17,8 @@ build:lektor:
.deploy_template: &deploy_definition # Hidden key that defines an anchor named 'job_definition'
image: nikolaik/python-nodejs
tags: # Select a runner which can connect to the deploy server
- deploy
before_script:
- apt-get update -qq
- apt-get install -qq -yy rsync openssh-client
......@@ -25,7 +26,7 @@ build:lektor:
- chmod 700 ~/.ssh
- eval $(ssh-agent -s)
- echo "${DEPLOY_KEY}" | tr -d '\r' | ssh-add - > /dev/null
- ssh-keyscan -p ${DEPLOY_PORT} "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
- ssh-keyscan "${DEPLOY_HOST}" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
only:
- master
......@@ -38,7 +39,7 @@ staging:testing:
name: staging
url: https://www.test.mittelab.org
script:
- rsync -avz --delete -e "ssh -p ${DEPLOY_PORT}" www/ "${DEPLOY_USER}@${DEPLOY_HOST}:subdomains/test/"
- rsync -avz --delete www/ "${DEPLOY_USER}@${DEPLOY_HOST}:test/"
deploy:production:
......@@ -48,7 +49,7 @@ deploy:production:
name: deploy
url: https://www.mittelab.org
script:
- rsync -avz --delete -e "ssh -p ${DEPLOY_PORT}" www/ "${DEPLOY_USER}@${DEPLOY_HOST}:www/"
- rsync -avz --delete www/ "${DEPLOY_USER}@${DEPLOY_HOST}:www/"
when: manual
dependencies:
- build:lektor
......
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