gitlab-cy.yml

This commit is contained in:
s0dy
2018-11-18 00:06:57 +01:00
parent 3536236ab2
commit c2d5c80590
2 changed files with 14 additions and 2 deletions

View File

@@ -2,10 +2,19 @@ image: geerlingguy/docker-debian9-ansible
before_script:
- which ssh-agent || ( apt-get update -qq -y && apt-get install openssh-client -qq -y )
# Run ssh-agent (inside the build environment)
- eval $(ssh-agent -s)
# Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
#- mkdir -p ~/.ssh
#- chmod 700 ~/.ssh
#Verifying the SSH host keys
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
deploy_to_webserver:
stage: deploy