diff --git a/release_dashboard/utils/build.py b/release_dashboard/utils/build.py index 6ee4b0c..db58662 100644 --- a/release_dashboard/utils/build.py +++ b/release_dashboard/utils/build.py @@ -14,6 +14,7 @@ # with this program. If not, see . import logging +import string import uuid import urllib import requests @@ -85,6 +86,11 @@ def trigger_build(project, trigger_release=None, if trigger_branch_or_tag.startswith("tag/"): tag = trigger_branch_or_tag.split("tag/")[1] params['tag'] = urllib.parse.quote(tag) + + # branch is like tag but removing the last element, + # e.g. tag=mr5.5.2.1 -> branch=mr5.5.2 + branch = string.join(tag.split(".")[0:-1], ".") + params['branch'] = urllib.parse.quote(branch) elif trigger_branch_or_tag.startswith("branch/"): branch = trigger_branch_or_tag.split("branch/")[1] params['branch'] = urllib.parse.quote(branch)