mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
trigger_cerbero_pipeline.py: Do not hardcode gitlab instance
When GStreamer is forked into a private GitLab instance we should trigger cerbero into that private instance too. Otherwise the token won't be accepted. Also do not hardcode the cerbero project ID because it is instance specific. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1056>
This commit is contained in:
parent
01cfc1ee7e
commit
d4296b7d3d
1 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,8 @@ import os
|
|||
import sys
|
||||
import gitlab
|
||||
|
||||
CERBERO_ID = 1340
|
||||
CERBERO_PROJECT = 'gstreamer/cerbero'
|
||||
|
||||
|
||||
|
||||
class Status:
|
||||
|
@ -33,13 +34,12 @@ def fprint(msg):
|
|||
|
||||
|
||||
if __name__ == "__main__":
|
||||
gl = gitlab.Gitlab(
|
||||
"https://gitlab.freedesktop.org/",
|
||||
server = os.environ['CI_SERVER_URL']
|
||||
gl = gitlab.Gitlab(server,
|
||||
private_token=os.environ.get('GITLAB_API_TOKEN'),
|
||||
job_token=os.environ.get('CI_JOB_TOKEN')
|
||||
)
|
||||
job_token=os.environ.get('CI_JOB_TOKEN'))
|
||||
|
||||
cerbero = gl.projects.get(CERBERO_ID)
|
||||
cerbero = gl.projects.get(CERBERO_PROJECT)
|
||||
pipe = cerbero.trigger_pipeline(
|
||||
token=os.environ['CI_JOB_TOKEN'],
|
||||
ref=os.environ["GST_UPSTREAM_BRANCH"],
|
||||
|
|
Loading…
Reference in a new issue