Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëtan Gilbert
Iris
Commits
08ea4ad2
Commit
08ea4ad2
authored
3 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
support GitLab MR syntax for setting std++/Iris repo and rev
parent
593cc6fe
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build-all
+14
-1
14 additions, 1 deletion
build-all
with
14 additions
and
1 deletion
build-all
+
14
−
1
View file @
08ea4ad2
...
...
@@ -6,8 +6,21 @@ import requests
# against a branch of your choice.
# Set the GITLAB_TOKEN environment variable to a GitLab access token.
# Set at least one of IRIS_REV or STDPP_REV to control which branches of these projects to build against
# (default to `master`).
# (default to default git branch). IRIS_REPO and STDPP_REPO can be used to take branches from forks.
# Setting IRIS to "user:branch" will use the given branch on that user's fork of Iris, and similar for STDPP.
# Pre-processing: we support setting `PROJECT` to `user:branch` (GitLab MR syntax),
# which will set `PROJECT_REPO` and `PROJECT_REV` automatically.
def
preprocess_repo_rev
(
project
):
var
=
project
.
upper
()
if
var
in
os
.
environ
:
(
repo
,
rev
)
=
os
.
environ
[
var
].
split
(
'
:
'
)
os
.
environ
[
var
+
"
_REPO
"
]
=
repo
+
"
/
"
+
project
os
.
environ
[
var
+
"
_REV
"
]
=
rev
preprocess_repo_rev
(
'
STDPP
'
)
preprocess_repo_rev
(
'
IRIS
'
)
# Check if everything is set
if
not
"
GITLAB_TOKEN
"
in
os
.
environ
:
print
(
"
You need to set the GITLAB_TOKEN environment variable to a GitLab access token.
"
)
print
(
"
You can create such tokens at <https://gitlab.mpi-sws.org/profile/personal_access_tokens>.
"
)
...
...
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