X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=jjb-test%2Fexpected-xml%2Fgithub-ciman-jjb-merge;h=e17ba60a4d79b18b3c2877ffdbf1b98a2913bc64;hb=4b3373319d2d9301e092a1171d6a51a48664523a;hp=ce75fbc359c3b352b0c61547836585145db3dc07;hpb=c9d4074e828ab8d5a8455bc43059f6584708c76c;p=releng%2Fglobal-jjb.git diff --git a/jjb-test/expected-xml/github-ciman-jjb-merge b/jjb-test/expected-xml/github-ciman-jjb-merge index ce75fbc3..e17ba60a 100644 --- a/jjb-test/expected-xml/github-ciman-jjb-merge +++ b/jjb-test/expected-xml/github-ciman-jjb-merge @@ -300,6 +300,27 @@ echo "machine $machine login $user password $pass" > ~/.netrc ############################################################################## echo "---> lftools-install.sh" +# By default a released version of lftools should always be used. +# The purpose of the 2 variables below is so that lftools devs can test +# unreleased versions of lftools. There are 2 methods to install a dev version +# of lftools: +# +# 1) gerrit patch: Used to test a patch that has not yet been merged. +# To do this set something like this: +# LFTOOLS_MODE=gerrit +# LFTOOLS_REFSPEC=refs/changes/96/5296/7 +# +# 2) git branch: Used to install an lftools version from a specific branch. +# To use this set the variables as follows: +# LFTOOLS_MODE=git +# LFTOOLS_REFSPEC=master +# +# 3) release : The intended use case and default setting. +# Set LFTOOLS_MODE=release, in this case LFTOOLS_REFSPEC is unused. + +LFTOOLS_MODE=release # release | git | gerrit +LFTOOLS_REFSPEC=master + # Ensure we fail the job if any steps fail. # DO NOT set -u as virtualenv's activate script has unbound variables set -e -o pipefail @@ -308,7 +329,26 @@ virtualenv --quiet "/tmp/v/lftools" # shellcheck source=/tmp/v/lftools/bin/activate disable=SC1091 source "/tmp/v/lftools/bin/activate" pip install --quiet --upgrade pip -pip install --quiet --upgrade "lftools<1.0.0" + +case $LFTOOLS_MODE in + gerrit) + git clone https://gerrit.linuxfoundation.org/infra/releng/lftools.git /tmp/lftools + pushd /tmp/lftools + git fetch origin "$LFTOOLS_REFSPEC" + git checkout FETCH_HEAD + pip install --quiet --upgrade -r requirements.txt + pip install --quiet --upgrade -e . + popd + ;; + + git) + pip install --quiet --upgrade git+https://gerrit.linuxfoundation.org/infra/releng/lftools.git@"$BRANCH" + ;; + + release) + pip install --quiet --upgrade "lftools<1.0.0" + ;; +esac # pipdeptree prints out a lot of information because lftools pulls in many # dependencies. Let's only print it if we want to debug.