diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-11-26 12:10:35 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-11-26 12:10:35 +0100 |
commit | 2d0b65de30946888cdeb9444cfc1b0bbe299935e (patch) | |
tree | aeb68edee7849d3ce1daa7e7ed7273e64bf00dfc | |
parent | 9a07d099cf2d9ddcac727800b8fa35ddfa728986 (diff) | |
download | NetworkManager-2d0b65de30946888cdeb9444cfc1b0bbe299935e.tar.gz |
rh-bkr: rename GIT_URL and GIT_TESTBRANCH
GIT_URL conflicts with Jenkins' use. Rename it to something more sensible and
rename the GIT_TESTBRANCH for consistency as well.
-rwxr-xr-x | contrib/rh-bkr/bkr.py | 22 | ||||
-rwxr-xr-x | contrib/rh-bkr/jenkins.sh | 10 | ||||
-rw-r--r-- | contrib/rh-bkr/job01.xml | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/contrib/rh-bkr/bkr.py b/contrib/rh-bkr/bkr.py index 84a2b09937..6dcec33cb1 100755 --- a/contrib/rh-bkr/bkr.py +++ b/contrib/rh-bkr/bkr.py @@ -658,7 +658,7 @@ class CmdSubmit(CmdBase): # if unspecified, detect the test-plan based on the target-branch. try: - target_branch = self.__process_line_get_GIT_TARGETBRANCH_detect("nitrate-test-plan") + target_branch = self.__process_line_get_GIT_TEST_BRANCH_detect("nitrate-test-plan") except: target_branch = None @@ -670,10 +670,10 @@ class CmdSubmit(CmdBase): print("Detected nitrate-test-plan=%s" % (t)) return t - def __process_line_get_GIT_TARGETBRANCH_detect(self, key_name): + def __process_line_get_GIT_TEST_BRANCH_detect(self, key_name): # we default to 'master', unless there is an RPM that looks like it's from # rhel-7.0. - v = self._get_var('GIT_TARGETBRANCH') + v = self._get_var('GIT_TEST_BRANCH') if v is not None: return v if self.rpm is not None: @@ -706,8 +706,8 @@ class CmdSubmit(CmdBase): return 'master' # upstream 1.1 if self.options.build_id: return 'master' - raise Exception("could not detect %s. Try setting as target branch GIT_TARGETBRANCH%s" % (key_name, - ((" or "+key_name) if key_name != 'GIT_TARGETBRANCH' else ''))) + raise Exception("could not detect %s. Try setting as target branch GIT_TEST_BRANCH%s" % (key_name, + ((" or "+key_name) if key_name != 'GIT_TEST_BRANCH' else ''))) def _detect_hosttype(self): return 'default' @@ -746,14 +746,14 @@ class CmdSubmit(CmdBase): else: return '<group op="=" value="desktopqe-net"/>' - def _get_var_for_GIT_TARGETBRANCH(self, key): - return self.__process_line_get_GIT_TARGETBRANCH_detect("GIT_TARGETBRANCH") + def _get_var_for_GIT_TEST_BRANCH(self, key): + return self.__process_line_get_GIT_TEST_BRANCH_detect("GIT_TEST_BRANCH") def _get_var_for_DISTRO_NAME(self, key): v = self._get_var('DISTO_NAME') if v is not None: return v - target_branch = self.__process_line_get_GIT_TARGETBRANCH_detect("DISTRO_NAME") + target_branch = self.__process_line_get_GIT_TEST_BRANCH_detect("DISTRO_NAME") if target_branch == 'rhel-7.0': return 'RHEL-7.0-20140507.0' if target_branch == 'rhel-7.1': @@ -766,7 +766,7 @@ class CmdSubmit(CmdBase): v = self._get_var('DISTRO_TAG') if v is not None: return v - target_branch = self.__process_line_get_GIT_TARGETBRANCH_detect("DISTRO_TAG") + target_branch = self.__process_line_get_GIT_TEST_BRANCH_detect("DISTRO_TAG") if target_branch == 'rhel-7.0': return 'RHEL-7_0-Z-branch' if target_branch == 'rhel-7.1': @@ -849,7 +849,8 @@ class CmdSubmit(CmdBase): 'JOBTYPE' : _get_var_for_JOBTYPE, 'DISTROREQUIRES' : _get_var_for_DISTROREQUIRES, 'TEST_URL' : 'http://download.eng.brq.redhat.com/scratch/vbenes/NetworkManager-rhel-7.tar.gz', - 'GIT_TARGETBRANCH' : _get_var_for_GIT_TARGETBRANCH, + 'GIT_TEST_REPO' : 'http://code.engineering.redhat.com/gerrit/desktopqe/NetworkManager', + 'GIT_TEST_BRANCH' : _get_var_for_GIT_TEST_BRANCH, 'UUID' : str(uuid.uuid4()), 'RESERVESYS' : _get_var_for_RESERVESYS, 'SELINUX_DISABLED' : _get_var_for_SELINUX_DISABLED, @@ -859,7 +860,6 @@ class CmdSubmit(CmdBase): 'CONF_LOGLEVEL' : 'DEBUG', 'CONF_DHCP' : 'dhclient', 'CONF_DEBUG' : 'RLIMIT_CORE,fatal-warnings', - 'GIT_URL' : 'http://code.engineering.redhat.com/gerrit/desktopqe/NetworkManager', 'RPM_LIST' : _get_var_for_RPM_LIST, } def _process_line_get(self, key, replacements): diff --git a/contrib/rh-bkr/jenkins.sh b/contrib/rh-bkr/jenkins.sh index ccaf756ea9..68e331e36c 100755 --- a/contrib/rh-bkr/jenkins.sh +++ b/contrib/rh-bkr/jenkins.sh @@ -16,7 +16,7 @@ DIR="$(dirname "$(readlink -f "$0")")" # HOSTYPE= # TESTS= # ARGS= -# GIT_TARGETBRANCH= +# GIT_TEST_BRANCH= # Trigger from remote: # TOKEN_NAME= // secret @@ -50,10 +50,10 @@ for r in $ARGS; do _ARGS+=("$r") done -if [ -n "$GIT_TARGETBRANCH" -a "$GIT_TARGETBRANCH" != "--" ]; then - GIT_TARGETBRANCH=(--var "GIT_TARGETBRANCH=$GIT_TARGETBRANCH") +if [ -n "$GIT_TEST_BRANCH" -a "$GIT_TEST_BRANCH" != "--" ]; then + GIT_TEST_BRANCH=(--var "GIT_TEST_BRANCH=$GIT_TEST_BRANCH") else - GIT_TARGETBRANCH=() + GIT_TEST_BRANCH=() fi if [ "$ARCH" == "<random>" ]; then @@ -75,7 +75,7 @@ python -u \ "${PROFILE[@]}" \ "${HOSTTYPE[@]}" \ --var "TESTS=$TESTS" \ - "${GIT_TARGETBRANCH[@]}" \ + "${GIT_TEST_BRANCH[@]}" \ --bkr-write-job-id 'beaker_job_id' \ --bkr-wait-completion \ --bkr-job-results 'results.xml' \ diff --git a/contrib/rh-bkr/job01.xml b/contrib/rh-bkr/job01.xml index 392b442ff4..97acdaa6a5 100644 --- a/contrib/rh-bkr/job01.xml +++ b/contrib/rh-bkr/job01.xml @@ -150,11 +150,11 @@ fi </task> <task name="/qe/desktop/simpletestharness" role="STANDALONE"> <params> - <param name="GIT_TARGETBRANCH" value="$GIT_TARGETBRANCH"/> + <param name="GIT_URL" value="$GIT_TEST_REPO"/> + <param name="GIT_TARGETBRANCH" value="$GIT_TEST_BRANCH"/> <param name="TESTS" value="$TESTS"/> <param name="TEST_MAPPER" value="True"/> <param name="COMPONENT" value="NetworkManager"/> - <param name="GIT_URL" value="$GIT_URL"/> <param name="TYPE" value="TEST"/> </params> </task> |