mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 11:15:31 +00:00
ci: trigger_cerbero_pipeline: improve error in case of insufficient permissions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6608>
This commit is contained in:
parent
d002acdd0c
commit
3f90dca733
1 changed files with 20 additions and 5 deletions
|
@ -91,11 +91,26 @@ if __name__ == "__main__":
|
|||
variables['MESON_COMMIT'] = meson_commit
|
||||
del variables['CI_GSTREAMER_TRIGGERED']
|
||||
|
||||
pipe = cerbero.trigger_pipeline(
|
||||
token=os.environ['CI_JOB_TOKEN'],
|
||||
ref=cerbero_branch,
|
||||
variables=variables,
|
||||
)
|
||||
try:
|
||||
pipe = cerbero.trigger_pipeline(
|
||||
token=os.environ['CI_JOB_TOKEN'],
|
||||
ref=cerbero_branch,
|
||||
variables=variables,
|
||||
)
|
||||
except gitlab.exceptions.GitlabCreateError as e:
|
||||
if e.response_code == 400:
|
||||
exit('''
|
||||
|
||||
Could not start cerbero sub-pipeline due to insufficient permissions.
|
||||
|
||||
This is not a problem and is expected if you are not a GStreamer
|
||||
developer with merge permission in the cerbero project.
|
||||
|
||||
When your Merge Request is assigned to Marge (our merge bot), it
|
||||
will trigger the cerbero sub-pipeline with the correct permissions.
|
||||
''')
|
||||
else:
|
||||
exit(f'Could not create cerbero sub-pipeline. Error: {e}')
|
||||
|
||||
fprint(f'Cerbero pipeline running at {pipe.web_url} ')
|
||||
while True:
|
||||
|
|
Loading…
Reference in a new issue