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

deploy_gitlab_ci: revert trigger pipeline on integration branch

Explicitly triggering a pipeline in the target repository does not work
easily from this place because we would have to distinguish between the
manifest (which uses branch pipelines) and the sub-projects (which use
merge request pipelines). This separation should not be hard-coded here,
so we move the decision whether or not to run a pipeline to the
.gitlab-ci.yml file of the target. Reverting these two commits:

63279799
    deploy_gitlab_ci: trigger pipeline only if it has not run before

dfc6204a
    deploy_gitlab_ci: trigger pipeline on integration branch
parent faf20731
No related branches found
No related tags found
1 merge request!76deploy_gitlab_ci: revert trigger pipeline on integration branch
Pipeline #8646 passed with stages
in 28 minutes and 39 seconds
......@@ -3,7 +3,7 @@ import common
import argparse
import sys
from gitlab import Gitlab, GitlabCreateError
from gitlab import Gitlab
from accept_merge_request import accept_merge_request
from create_merge_request import create_merge_request
from get_merge_requests import get_merge_requests
......@@ -64,7 +64,7 @@ def main():
project = common.get_project(gitlab, args.project)
# Update submodule
integration_branch, integration_commit, submodule_project = update_submodule(
integration_branch, _, submodule_project = update_submodule(
project, args.submodule, args.revision, args.branch
)
......@@ -91,14 +91,6 @@ def main():
else:
print("Existing integration merge request:\n%s" % mr.web_url)
# 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(
"Skipping automatic merge in MR context. If you like to extend the "
......
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