Loading gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ stages: .common: &common image: registry.cyberbrain.pw/ansible/ansible before_script: - eval $(ssh-agent -s); echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - chmod -R o-w ../ ########################################################################################################## Loading Loading @@ -65,8 +67,6 @@ deploy: - $GIT_URL =~ /^\S+$/ script: - echo "Deploying configuration [${GIT_URL}] with parameters [${PARAMETERS}]" - eval $(ssh-agent -s); echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - export INVENTORY_DIRECTORY="`pwd`" - git config --global credential.helper store && echo "https://${GIT_LOGIN}:${GIT_PASSWORD}@$(echo ${GIT_URL} | sed -r 's#([^/])/[^/].*#\1#' | sed -e 's|https://||g')" > ~/.git-credentials - mkdir -p /tmp/checkout && git clone "${GIT_URL}" /tmp/checkout && cd /tmp/checkout Loading Loading
gitlab-ci.yml +2 −2 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ stages: .common: &common image: registry.cyberbrain.pw/ansible/ansible before_script: - eval $(ssh-agent -s); echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - chmod -R o-w ../ ########################################################################################################## Loading Loading @@ -65,8 +67,6 @@ deploy: - $GIT_URL =~ /^\S+$/ script: - echo "Deploying configuration [${GIT_URL}] with parameters [${PARAMETERS}]" - eval $(ssh-agent -s); echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null - mkdir -p ~/.ssh && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - export INVENTORY_DIRECTORY="`pwd`" - git config --global credential.helper store && echo "https://${GIT_LOGIN}:${GIT_PASSWORD}@$(echo ${GIT_URL} | sed -r 's#([^/])/[^/].*#\1#' | sed -e 's|https://||g')" > ~/.git-credentials - mkdir -p /tmp/checkout && git clone "${GIT_URL}" /tmp/checkout && cd /tmp/checkout Loading