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

merge_into_manifest: remove canceling of pipelines

The canceling was required when a reintegration was necessary before merging. The instant merge afterwards deleted the integration branch, so the pipeline on the branch would fail, because repo cannot checkout the code anymore. With minimal-manifest!126 we started checking out code using refs/pipelines/<id> instead of explicit branch/tag names. This ref still exists when the branch is already deleted (see https://docs.gitlab.com/ce/ci/pipelines/#ref-specs-for-runners), so the pipeline canceling is not necessary anymore.
parent 982bbeac
No related branches found
No related tags found
1 merge request!18merge_into_manifest: remove canceling of pipelines
Pipeline #8094 passed with stage
in 17 seconds
...@@ -100,30 +100,6 @@ def merge_into_manifest(manifest_project, master_branch, project, commit): ...@@ -100,30 +100,6 @@ def merge_into_manifest(manifest_project, master_branch, project, commit):
print("Successfully merged") print("Successfully merged")
# Check if there is a running pipeline on the integration branch and cancel it.
# This happens when a reintegration was necessary before merging. The instant
# merge afterwards deletes the integration branch, so the pipeline on the branch
# will fail, because repo cannot checkout the code anymore. In order not to
# confuse people, we better cancel it. Since there is a pipeline running on the
# master after merging, we don't need the branch results anyway.
try:
pipelines = manifest_project.pipelines.list(
sha=manifest_revision,
ref=integration_branch,
retry_transient_errors=True,
)
except GitlabGetError:
print("WARNING: could not list pipelines for project '%s'" % project.name)
if pipelines:
pipeline = pipelines[0]
if pipeline.status in common.pending_states:
pipeline.cancel()
print(
"Cancelling running pipeline for integration branch '%s':"
% integration_branch
)
print(pipeline.web_url)
return manifest_revision return manifest_revision
......
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