Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
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
Container Registry
Model registry
Monitor
Incidents
Service Desk
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
The Tor Project
Core
Tor
Commits
7a45c9c1
Commit
7a45c9c1
authored
5 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'tor-github/pr/1215'
parents
f1707f7d
d6202d31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket29879
+7
-0
7 additions, 0 deletions
changes/ticket29879
scripts/git/git-push-all.sh
+42
-9
42 additions, 9 deletions
scripts/git/git-push-all.sh
with
49 additions
and
9 deletions
changes/ticket29879
0 → 100644
+
7
−
0
View file @
7a45c9c1
o Minor features (git scripts):
- Add a TOR_PUSH_DELAY variable to git-push-all.sh, which makes the script
push master and maint branches with a delay between each branch. These
delays trigger the CI jobs in a set order, which should show the most
likely failures first. Also make pushes atomic by default, and make
the script pass any command-line arguments to git push.
Closes ticket 29879.
This diff is collapsed.
Click to expand it.
scripts/git/git-push-all.sh
+
42
−
9
View file @
7a45c9c1
#!/usr/bin/env bash
# The remote upstream branch on which git.torproject.org/tor.git points to.
UPSTREAM_BRANCH
=
${
TOR_UPSTREAM_REMOTE_NAME
:-
"upstream"
}
git push
"
$UPSTREAM_BRANCH
"
\
master
\
{
release,maint
}
-0
.4.1
\
{
release,maint
}
-0
.4.0
\
{
release,maint
}
-0
.3.5
\
{
release,maint
}
-0
.2.9
# Usage: git-push-all.sh
# env vars: TOR_UPSTREAM_REMOTE_NAME=upstream TOR_PUSH_DELAY=0
# options: --no-atomic --dry-run (any other git push option)
#
# TOR_PUSH_DELAY pushes the master and maint branches separately, so that CI
# runs in a sensible order.
# push --atomic is the default when TOR_PUSH_DELAY=0, and for release branches.
set
-e
# The upstream remote which git.torproject.org/tor.git points to.
UPSTREAM_REMOTE
=
${
TOR_UPSTREAM_REMOTE_NAME
:-
"upstream"
}
# Add a delay between pushes, so CI runs on the most important branches first
PUSH_DELAY
=
${
TOR_PUSH_DELAY
:-
0
}
PUSH_BRANCHES
=
`
echo
\
master
\
{
release,maint
}
-0
.4.1
\
{
release,maint
}
-0
.4.0
\
{
release,maint
}
-0
.3.5
\
{
release,maint
}
-0
.2.9
\
`
if
[
"
$PUSH_DELAY
"
-le
0
]
;
then
echo
"Pushing
$PUSH_BRANCHES
"
git push
--atomic
"
$@
"
"
$UPSTREAM_REMOTE
"
$PUSH_BRANCHES
else
PUSH_BRANCHES
=
`
echo
"
$PUSH_BRANCHES
"
|
tr
" "
"
\n
"
|
sort
-V
`
MASTER_BRANCH
=
`
echo
"
$PUSH_BRANCHES
"
|
tr
" "
"
\n
"
|
grep
master
`
MAINT_BRANCHES
=
`
echo
"
$PUSH_BRANCHES
"
|
tr
" "
"
\n
"
|
grep
maint
`
RELEASE_BRANCHES
=
`
echo
"
$PUSH_BRANCHES
"
|
tr
" "
"
\n
"
|
grep
release |
\
tr
"
\n
"
" "
`
printf
"Pushing with %ss delays, so CI runs in this order:
\n
%s
\n
%s
\n
%s
\n
"
\
"
$PUSH_DELAY
"
"
$MASTER_BRANCH
"
"
$MAINT_BRANCHES
"
"
$RELEASE_BRANCHES
"
git push
"
$@
"
"
$UPSTREAM_REMOTE
"
$MASTER_BRANCH
sleep
"
$PUSH_DELAY
"
for
b
in
$MAINT_BRANCHES
;
do
git push
"
$@
"
"
$UPSTREAM_REMOTE
"
$b
sleep
"
$PUSH_DELAY
"
done
git push
--atomic
"
$@
"
"
$UPSTREAM_REMOTE
"
$RELEASE_BRANCHES
fi
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