MT#55524 build: use <distribution>/master as branch instead of master

In order to support building the next supported release using the special
branch <distribution>/master if exists. Jenkins job <project>-get-code
will detect the missing branch and fallback to master if necessary

Change-Id: I798b5b1653e52e9cb4b91e9aca18cf7ec6a0916a
pull/9/head
Victor Seva 3 years ago
parent 76219ee12f
commit 0eabc3f67b

@ -430,7 +430,7 @@ class TriggerBuild(SimpleTestCase):
"{base}/job/{project}/buildWithParameters?"
"token={token}&cause={trigger_release}&uuid={uuid}&"
"release_uuid={release_uuid}&"
"branch=master&tag=none&"
"branch={trigger_distribution}/master&tag=none&"
"release=trunk&distribution={trigger_distribution}"
)
res = trigger_build(**params)

@ -159,6 +159,8 @@ def trigger_build(
params["branch"] = urllib.parse.quote(branch)
elif trigger_branch_or_tag.startswith("branch/"):
branch = trigger_branch_or_tag.split("branch/")[1]
if branch == "master":
branch = f"{trigger_distribution}/master"
params["branch"] = urllib.parse.quote(branch)
else:
params["branch"] = urllib.parse.quote(trigger_branch_or_tag)

Loading…
Cancel
Save