The downloadCwctl() function -- which is used to download the Codewind CLI when running Tempest automated tests -- is currently programmed to only grab the installer from the master branch. Once we shift to running tests on product branches, this installer version will not correspond to the product version being tested.
So we should shift to using the appropriate installer branch, depending on whether it is a PR build, a product build, or a local (developer's machine) build.
If running outside a Jenkins pipeline, the following will get the current branch:
BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`
If running in a Jenkins pipeline, the following will be automatically be set by the Jenkins plugins we are using in Eclipse CBI:
BRANCH_NAME (local branch)
CHANGE_TARGET (branch of the pull request, if the pipeline is running in a PR)
The
downloadCwctl()
function -- which is used to download the Codewind CLI when running Tempest automated tests -- is currently programmed to only grab the installer from themaster
branch. Once we shift to running tests on product branches, this installer version will not correspond to the product version being tested.So we should shift to using the appropriate installer branch, depending on whether it is a PR build, a product build, or a local (developer's machine) build.
If running outside a Jenkins pipeline, the following will get the current branch:
If running in a Jenkins pipeline, the following will be automatically be set by the Jenkins plugins we are using in Eclipse CBI: