From 7d4fec959c426525ca985af6176448a3ff444e64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hu=CC=88rtgen?= Date: Tue, 11 Apr 2017 18:23:09 +0200 Subject: [PATCH 1/3] BUGFIX: Set default gitlab-ci image (alpine) & switch commands --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fef7f7e..2d8d1cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,5 @@ +image: 'bash:latest' + before_script: - apk add --no-cache make wget git - make install-composer @@ -11,8 +13,7 @@ stages: sync:github: stage: sync before_script: - - apt-get -y update && apt-get -y upgrade - - apt-get -y install openssh-client git + - apk add --no-cache openssh-client git # SSH deploy key - eval $(ssh-agent -s) - ssh-add <(echo "$SSH_PRIVATE_KEY") From 5ec3d2eea2207f6775d3755ebe5040f5485fbdcf Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 11 Apr 2017 20:21:20 +0200 Subject: [PATCH 2/3] WIP|BUGFIX: Allow ssh auth for github sync * Use variable as in all other scripts. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d8d1cb..9141aac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,7 @@ sync:github: - apk add --no-cache openssh-client git # SSH deploy key - eval $(ssh-agent -s) - - ssh-add <(echo "$SSH_PRIVATE_KEY") + - ssh-add <(echo "${SSH_PRIVATE_KEY}") - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: From 771d84e548bd22cb1c9ecce724e6b03f5bc09698 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 11 Apr 2017 20:56:30 +0200 Subject: [PATCH 3/3] BUGFIX: Allow ssh agent to work on alpine * Use a file instead of bash expansion. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9141aac..0ff57a6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,9 @@ sync:github: - apk add --no-cache openssh-client git # SSH deploy key - eval $(ssh-agent -s) - - ssh-add <(echo "${SSH_PRIVATE_KEY}") + - echo "$SSH_PRIVATE_KEY" > /tmp/private_key + - chmod go-rwx /tmp/private_key; chmod u-x /tmp/private_key + - ssh-add /tmp/private_key - mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' script: