From 2eae133a249a54622cdf2d0e2bd30dfe252c1744 Mon Sep 17 00:00:00 2001 From: Jack Goh Date: Thu, 2 Aug 2018 15:15:57 +0800 Subject: [PATCH] fix host not found when deploying --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 996b4f9a..24a31fe5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,9 +25,10 @@ staging: - mkdir -p ~/.ssh - echo -e "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - - '[[ ! -e /.dockerenv ]] && exit 0' + - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: - ssh izyim@40.76.84.105 "git pull origin master && sudo docker-compose -f docker-prod.yml up -d" environment: name: staging + url: https://exchange-staging.izyim.com/ when: manual