Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sync Branch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tools
Continuous Integration
Repositories
Sync Branch
Commits
4d030e17
Commit
4d030e17
authored
Feb 11, 2024
by
Dmitriy Safronov
Browse files
Options
Downloads
Patches
Plain Diff
main
Signed-off-by:
Dmitriy Safronov
<
zimniy@cyberbrain.pw
>
parent
dbaabe17
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab-ci.yml
+7
-7
7 additions, 7 deletions
gitlab-ci.yml
with
7 additions
and
7 deletions
gitlab-ci.yml
+
7
−
7
View file @
4d030e17
...
@@ -15,8 +15,8 @@ variables:
...
@@ -15,8 +15,8 @@ variables:
value
:
"
"
value
:
"
"
description
:
"
1.2)
ОБЯЗАТЕЛЬНАЯ
ПЕРЕМЕННАЯ:
указываем
ssh-ключ
репозитория
нашего
форка"
description
:
"
1.2)
ОБЯЗАТЕЛЬНАЯ
ПЕРЕМЕННАЯ:
указываем
ssh-ключ
репозитория
нашего
форка"
GIT_PUSH_BRANCH
:
GIT_PUSH_BRANCH
:
value
:
"
ma
ster
"
value
:
"
ma
in
"
description
:
"
1.3)
НЕобязательная
переменная:
указываем
branch
(ma
ster
)
репозитория
нашего
форка"
description
:
"
1.3)
НЕобязательная
переменная:
указываем
branch
(ma
in
)
репозитория
нашего
форка"
GIT_PULL_REPO
:
GIT_PULL_REPO
:
value
:
"
"
value
:
"
"
description
:
"
2.1)
ОБЯЗАТЕЛЬНАЯ
ПЕРЕМЕННАЯ:
указываем
адрес
репозитория
оригинала"
description
:
"
2.1)
ОБЯЗАТЕЛЬНАЯ
ПЕРЕМЕННАЯ:
указываем
адрес
репозитория
оригинала"
...
@@ -24,8 +24,8 @@ variables:
...
@@ -24,8 +24,8 @@ variables:
value
:
"
"
value
:
"
"
description
:
"
2.2)
НЕобязательная
переменная:
указываем
ssh-ключ
репозитория
оригинала"
description
:
"
2.2)
НЕобязательная
переменная:
указываем
ssh-ключ
репозитория
оригинала"
GIT_PULL_BRANCH
:
GIT_PULL_BRANCH
:
value
:
"
ma
ster
"
value
:
"
ma
in
"
description
:
"
2.3)
НЕобязательная
переменная:
указываем
branch
(ma
ster
)
репозитория
оригинала"
description
:
"
2.3)
НЕобязательная
переменная:
указываем
branch
(ma
in
)
репозитория
оригинала"
##########################################################################################################
##########################################################################################################
...
@@ -50,11 +50,11 @@ sync:
...
@@ -50,11 +50,11 @@ sync:
-
test -n "${GIT_PULL_PRIVATE_KEY}" && echo "${GIT_PULL_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null ||
true
-
test -n "${GIT_PULL_PRIVATE_KEY}" && echo "${GIT_PULL_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null ||
true
-
test -n "${GIT_PUSH_PRIVATE_KEY}" && echo "${GIT_PUSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null ||
true
-
test -n "${GIT_PUSH_PRIVATE_KEY}" && echo "${GIT_PUSH_PRIVATE_KEY}" | tr -d '\r' | ssh-add - > /dev/null ||
true
script
:
script
:
-
echo "[${GIT_PULL_REPO}#${GIT_PULL_BRANCH:-ma
ster
}] -> [${GIT_PUSH_REPO}#${GIT_PUSH_BRANCH:-ma
ster
}]"
-
echo "[${GIT_PULL_REPO}#${GIT_PULL_BRANCH:-ma
in
}] -> [${GIT_PUSH_REPO}#${GIT_PUSH_BRANCH:-ma
in
}]"
-
rm -rf /tmp/repo
-
rm -rf /tmp/repo
-
git clone "${GIT_PULL_REPO}" -b "${GIT_PULL_BRANCH:-ma
ster
}" /tmp/repo
-
git clone "${GIT_PULL_REPO}" -b "${GIT_PULL_BRANCH:-ma
in
}" /tmp/repo
-
cd /tmp/repo
-
cd /tmp/repo
-
test -n "${GIT_TAGS}" && git fetch --tags ||
true
-
test -n "${GIT_TAGS}" && git fetch --tags ||
true
-
git remote add downstream "${GIT_PUSH_REPO}"
-
git remote add downstream "${GIT_PUSH_REPO}"
-
git push --force downstream "${GIT_PUSH_BRANCH:-ma
ster
}"
-
git push --force downstream "${GIT_PUSH_BRANCH:-ma
in
}"
-
test -n "${GIT_TAGS}" && git push --force downstream --tags ||
true
-
test -n "${GIT_TAGS}" && git push --force downstream --tags ||
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment