mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-05-18 16:28:14 +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
|
@ -91,11 +91,26 @@ if __name__ == "__main__":
|
||||||
variables['MESON_COMMIT'] = meson_commit
|
variables['MESON_COMMIT'] = meson_commit
|
||||||
del variables['CI_GSTREAMER_TRIGGERED']
|
del variables['CI_GSTREAMER_TRIGGERED']
|
||||||
|
|
||||||
pipe = cerbero.trigger_pipeline(
|
try:
|
||||||
token=os.environ['CI_JOB_TOKEN'],
|
pipe = cerbero.trigger_pipeline(
|
||||||
ref=cerbero_branch,
|
token=os.environ['CI_JOB_TOKEN'],
|
||||||
variables=variables,
|
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} ')
|
fprint(f'Cerbero pipeline running at {pipe.web_url} ')
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in a new issue