Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
ab66bb53
Commit
ab66bb53
authored
5 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[CI] Fix .push_to_github to remove all files in repo
Fix gitlab merge-requests branch removal
parent
940f112e
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!76
Merge of 0550 to dev
Pipeline
#6137
passed
5 years ago
Stage: format
Stage: test
Stage: build
Stage: release
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+7
-5
7 additions, 5 deletions
.gitlab-ci.yml
with
7 additions
and
5 deletions
.gitlab-ci.yml
+
7
−
5
View file @
ab66bb53
...
...
@@ -14,17 +14,19 @@ image: registry.duniter.org/docker/python3/duniterpy-builder:0.0.4
tags
:
-
github
after_script
:
# remove
last clone
# remove
all files in current repo
-
rm -rf ./*
-
rm -rf .git
# do a mirror clone
-
rm -rf .git
*
# do a mirror clone
in current repo
-
git clone --mirror $CI_REPOSITORY_URL .
# do config for github push
-
git remote add github $GITHUB_URL_AND_KEY
-
git config --global user.email "contact@duniter.org"
-
git config --global user.name "Duniter"
#
Job would fail if we don't
remove refs about
pull
requests
-
bash -c "cat packed-refs | grep -v 'refs/
pull
' > packed-refs-new; echo 'Removed
pull
refs.'"
# remove refs about
merge
requests
-
bash -c "cat packed-refs | grep -v 'refs/
merge-requests
' > packed-refs-new; echo 'Removed
merge-requests
refs.'"
-
mv packed-refs-new packed-refs
# github push
-
bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.pyenv
:
...
...
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