From 6c9df4afba5acfcc6f0d6bd6135eb3f619bea6e9 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov Date: Tue, 20 Apr 2021 00:57:46 +0300 Subject: [PATCH 1/2] gitlab-ci.yml --- gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index 919b534..c62ae3b 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -27,7 +27,6 @@ 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 - - cat ~/.git-credentials - git remote add upstream "${GIT_URL}" && git fetch upstream - git checkout master && git merge upstream/"${GIT_UPSTGREAM_BRANCH}" - git push -- GitLab From 12a19854a0d63897af21466f18c61733c6f7a6d8 Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov Date: Tue, 20 Apr 2021 00:58:35 +0300 Subject: [PATCH 2/2] gitlab-ci.yml --- gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab-ci.yml b/gitlab-ci.yml index c62ae3b..84b4886 100644 --- a/gitlab-ci.yml +++ b/gitlab-ci.yml @@ -28,5 +28,5 @@ sync: - ( 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 remote add upstream "${GIT_URL}" && git fetch upstream - - git checkout master && git merge upstream/"${GIT_UPSTGREAM_BRANCH}" + - git checkout --track origin/master && git merge upstream/"${GIT_UPSTGREAM_BRANCH}" - git push -- GitLab