diff --git a/manifest-integration-jobs.yml.jinja2 b/manifest-integration-jobs.yml.jinja2 index 19cdc67d37f6ffef025a558a3f9d86a37be9a575..74d3972496558eba9bb3e0ccc89d76a0f5916bdf 100644 --- a/manifest-integration-jobs.yml.jinja2 +++ b/manifest-integration-jobs.yml.jinja2 @@ -102,7 +102,7 @@ build: # FIXME: see FIXME comments in manifest-integration-pipelines.yml.jinja2 # project: $MANIFEST_PROJECT project: {{ TARGET_PROJECT }} - branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}" + branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/into/${MASTER_BRANCH_MANIFEST}" strategy: depend # -------------------------------------------------------------------------------------- diff --git a/scripts/check_if_integration_branch_is_up_to_date.py b/scripts/check_if_integration_branch_is_up_to_date.py index 42c260514f243ccf0a48086ad3d3b12491bc3bf4..a9f45ab553a2b277874c85d27985d7dd9703be4d 100755 --- a/scripts/check_if_integration_branch_is_up_to_date.py +++ b/scripts/check_if_integration_branch_is_up_to_date.py @@ -28,7 +28,7 @@ def check_if_integration_branch_is_up_to_date( pass if integration_branch is None: integration_branch_name = common.integration_branch_name( - project.name, merge_request.source_branch + project.name, merge_request.source_branch, integration_base ) branch_list.append(integration_branch) try: diff --git a/scripts/common.py b/scripts/common.py index 6e45da0e035058db433073eaa3ad33c1d93556a6..8154b2bccefee0219a6a1baa959214680edd631d 100755 --- a/scripts/common.py +++ b/scripts/common.py @@ -17,9 +17,16 @@ srcrev_file = "SRCREV.conf" pending_states = ["created", "waiting_for_resource", "preparing", "pending", "running"] -def integration_branch_name(project_name, branch_name): +def integration_branch_name(project_name, source_branch_name, target_branch_name): """Get integration branch name""" - return "integrate/" + project_name.lower() + "/" + branch_name + return ( + "integrate/" + + project_name.lower() + + "/" + + source_branch_name + + "/into/" + + target_branch_name + ) def is_gitlab_ci_integration_branch(branch_name): @@ -231,7 +238,7 @@ def clone_project(project: Project, into, branch=None): repo = Repo.clone_from(clone_url.url, into, branch=branch, depth=1) except GitCommandError as e: raise Exception("could not clone repository\n" + str(e)) from e - except IndexError: + except IndexError as e: raise Exception("branch '%s' not found" % branch) from e return repo diff --git a/scripts/integrate_into_manifest.py b/scripts/integrate_into_manifest.py index 223c5ffaef4c5b3d37e327c669cd12971c0ddce1..8c0fd7d213a25dce9aa8222d178674965004eba0 100755 --- a/scripts/integrate_into_manifest.py +++ b/scripts/integrate_into_manifest.py @@ -119,7 +119,7 @@ def integrate_into_manifest( else: # Create integration branch (delete former one if already exists) integration_branch = common.integration_branch_name( - project.name, merge_request.source_branch + project.name, merge_request.source_branch, integration_base ) for ref in manifest_repo.references: if integration_branch == ref.name: diff --git a/scripts/merge_into_manifest.py b/scripts/merge_into_manifest.py index f29cd76e79ca79eaf70f026eb4c825d06f338cd9..f57e66c9d9ee6f3ab2f167052dc5d14191875b6e 100755 --- a/scripts/merge_into_manifest.py +++ b/scripts/merge_into_manifest.py @@ -52,9 +52,12 @@ def merge_into_manifest( ) return "" - integration_branch = common.integration_branch_name(project.name, original_branch) target_branch = master_branch + integration_branch = common.integration_branch_name( + project.name, original_branch, target_branch + ) + # Create merge request. If there already is a merge request, we assume that it has # been opened manually and thus will be merged manually as well, so we fail here. mr, created = create_merge_request( diff --git a/scripts/update_submodule.py b/scripts/update_submodule.py index d22b47df3783230eaf16053945ba5241a2f0ba2a..32bfe97d8aff59782cc6be72c5493935f5b3d1bc 100755 --- a/scripts/update_submodule.py +++ b/scripts/update_submodule.py @@ -248,7 +248,7 @@ def update_submodule_and_include_ref( # Construct integration branch name integration_branch_name = common.integration_branch_name( - submodule_project.name, integration_branch_suffix + submodule_project.name, integration_branch_suffix, branch ) # Construct commit message