mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-08-12 19:31:58 +00:00
gitlab-cy.yml
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user