Commit 1d909c9a authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

fuck

parent 3665e41b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 ../

##########################################################################################################
@@ -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