diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 20d327db9a48f30e7b122b35ede64a7ef37a9ca4..828556307ba9100814a8b8f528727bd815e43d60 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -27,8 +27,8 @@ sync: - echo "${CI_SERVER_PROTOCOL}://${GIT_PUSH_LOGIN}:${GIT_PUSH_PASSWORD}@${CI_SERVER_HOST}" >> ~/.git-credentials || true - ( test -n "${GIT_LOGIN}" && test -n "${GIT_PASSWORD}" ) && echo "https://${GIT_LOGIN}:${GIT_PASSWORD}@$(echo ${GIT_URL} | sed -r 's#([^/])/[^/].*#\1#' | sed -e 's|https://||g')" >> ~/.git-credentials || true - ( 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 ) || true - - git checkout --track origin/master && git pull + - git checkout --track origin/master && git pull --ff-only - git remote add upstream "${GIT_URL}" && git fetch upstream - - git pull "upstream/${GIT_UPSTGREAM_BRANCH}" + - git pull --ff-only upstream/${GIT_UPSTGREAM_BRANCH} - echo -e "machine ${CI_SERVER_HOST}\nlogin ${GIT_PUSH_LOGIN}\npassword ${GIT_PUSH_PASSWORD}" > ~/.netrc - git push