From a3bcf7f3586ad4adb9fad21920ba004187b3a3a2 Mon Sep 17 00:00:00 2001 From: Manuel Montecelo Date: Tue, 12 Dec 2017 20:04:06 +0100 Subject: [PATCH] TT#26827 Release panel triggers jenkins jobs with branch=none Attempt to fix problem when release panel triggers jenkins jobs setting branch=none when tag=mrX.X.X.1, when the branch parameter should have branch=mrX.X.X A change from string.join() to "".join() is needed for Python 3. Change-Id: I89f7bb304180880bc7317b61aa675b8d2162f091 --- build/utils.py | 3 +-- release_dashboard/utils/build.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build/utils.py b/build/utils.py index a6a95a1..4d14228 100644 --- a/build/utils.py +++ b/build/utils.py @@ -14,7 +14,6 @@ # with this program. If not, see . import logging -import string import urllib import uuid from django.conf import settings @@ -50,7 +49,7 @@ def trigger_build(project, release_uuid, trigger_release=None, # 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], ".") + branch = ".".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] diff --git a/release_dashboard/utils/build.py b/release_dashboard/utils/build.py index db58662..043ec1e 100644 --- a/release_dashboard/utils/build.py +++ b/release_dashboard/utils/build.py @@ -14,7 +14,6 @@ # with this program. If not, see . import logging -import string import uuid import urllib import requests @@ -89,7 +88,7 @@ def trigger_build(project, trigger_release=None, # 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], ".") + branch = ".".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]