Hi,
I was trying a deployment by .gitlab-ci.yml to our Staging/Prod server. The servers are sitting behind a jump server and am unable to proxy out the jumpserver to deploy my commits to the server.
ssh: connect to host 157.230.64.108 port 22: Connection timed out
Below is my .gitlab-ci template. Could you please assist.
deploy_prodserver:
stage: deploy
environment:
name: prod_test_env
url: example.com
before_script:
- apt-get update -qq
#- apt-get install -y -qq sshpass - apt-get install -qq git
Setup SSH deploy keys
- ‘which ssh-agent || ( apt-get install -qq openssh-client )’
- eval $(ssh-agent -s)
- ssh-add <(echo “$JUMP_KEY”)
- mkdir -p ~/.ssh
- ‘[[ -f /.dockerenv ]] && echo -e “Host *\n\tStrictHostKeyChecking no\n\n” > ~/.ssh/config’
script:- ssh gitlab-ci@<jump_server_ip> -p 3557 “cd /home/gitlab-ci”
- eval $(ssh-agent -s)
- ssh-add <(echo “$SSH_PRIVATE_KEY”) #Prod server key file
- ‘echo -e “Host *\n\tStrictHostKeyChecking no\n\n” > ~/.ssh/config’
- ssh prod@<prod_server_ip> “cd /home/cdbot/prod-dir && git checkout master && git pull origin master && exit”
only: - master
- merge request