Skip to content
Snippets Groups Projects
Commit 63279799 authored by Tim Jaacks's avatar Tim Jaacks
Browse files

deploy_gitlab_ci: trigger pipeline only if it has not run before

parent 4c6b4621
No related branches found
No related tags found
1 merge request!74deploy_gitlab_ci: trigger pipeline only if it has not run before
Pipeline #8635 passed with warnings with stages
in 1 minute and 17 seconds
......@@ -64,7 +64,7 @@ def main():
project = common.get_project(gitlab, args.project)
# Update submodule
integration_branch, _, submodule_project = update_submodule(
integration_branch, integration_commit, submodule_project = update_submodule(
project, args.submodule, args.revision, args.branch
)
......@@ -91,12 +91,13 @@ def main():
else:
print("Existing integration merge request:\n%s" % mr.web_url)
# Explicitly trigger a pipeline on the integration branch (automatic pipelines are
# disabled for integration merge requests)
try:
project.pipelines.create({"ref": integration_branch})
except GitlabCreateError as e:
sys.exit("ERROR: could not create merge request pipeline: %s" % e)
# Explicitly trigger a pipeline on the integration branch if it has not run for the
# head commit yet (automatic pipelines are disabled for integration branches)
if not project.pipelines.list(sha=integration_commit):
try:
project.pipelines.create({"ref": integration_branch})
except GitlabCreateError as e:
sys.exit("ERROR: could not create merge request pipeline: %s" % e)
if not args.merge:
print(
......
  • Tobias Kahlki @tobias.kahlki

    mentioned in commit a35820b2

    By Tim Jaacks on 2022-01-17T16:18:31 (imported from GitLab)

    ·

    mentioned in commit a35820b2

    By Tim Jaacks on 2022-01-17T16:18:31 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in commit a35820b2

    By Tim Jaacks on 2022-01-17T16:18:31 (imported from GitLab)

    ·

    mentioned in commit a35820b2

    By Tim Jaacks on 2022-01-17T16:18:31 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in merge request !76 (merged)

    By Tim Jaacks on 2022-01-17T16:20:23 (imported from GitLab)

    ·

    mentioned in merge request !76 (merged)

    By Tim Jaacks on 2022-01-17T16:20:23 (imported from GitLab)

    Toggle commit list
  • Tobias Kahlki @tobias.kahlki

    mentioned in merge request !76 (merged)

    By Tim Jaacks on 2022-01-17T16:20:23 (imported from GitLab)

    ·

    mentioned in merge request !76 (merged)

    By Tim Jaacks on 2022-01-17T16:20:23 (imported from GitLab)

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment