From 53d7d6b91c2bfbec713a42186f59b3f5b5d91b3b Mon Sep 17 00:00:00 2001 From: Souhaila Noor Date: Tue, 23 Nov 2021 16:04:29 -0600 Subject: [PATCH] fix for ssh-add error --- .gitlab/.gitlab-ci.yml | 3 --- qa/scripts/deployNode.sh | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab/.gitlab-ci.yml b/.gitlab/.gitlab-ci.yml index b72fc4d35..6390da8ad 100644 --- a/.gitlab/.gitlab-ci.yml +++ b/.gitlab/.gitlab-ci.yml @@ -200,8 +200,5 @@ build container fb: deploy node for linux amd64: stage: lint image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest - before_script: - - apt update && apt -y install jq - - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' script: - ./qa/scripts/deployNode.sh $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY $AWS_SSH_PRIVATE_KEY diff --git a/qa/scripts/deployNode.sh b/qa/scripts/deployNode.sh index 7ba33a516..b2ad98313 100755 --- a/qa/scripts/deployNode.sh +++ b/qa/scripts/deployNode.sh @@ -11,10 +11,15 @@ function configure_env() { chmod 400 gitlab-featurebase-dev.pem # set up ssh permissions + which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) eval `ssh-agent -s` mkdir -p ~/.ssh - echo $AWS_SSH_PRIVATE_KEY | ssh-add - + echo "${AWS_SSH_PRIVATE_KEY}" | ssh-add - chmod 700 /root/.ssh + + # install jq + apt update && apt -y install jq + } function deploy_node() {