Update CI to handle the upgrade job on other branches
Currently the upgrade job:
- Checks out the default branch (here)
- Installs BB
- Checks out the
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
(here) - Upgrades BB
The issue with this is infrequent but can be seen when there is an MR from a feature branch -> another feature branch or a release branch. To make our CI more robust we should be able to swap the default branch with CI_MERGE_REQUEST_TARGET_BRANCH_NAME
. This will ensure that upgrade tests are always using the right branch.
Ensure that adequate testing is done to make sure this variable works as expected.
Definition of done:
-
CI updated to handle the problem case (MR into a release branch can be a good test) -
Test that a Draft MR from a feature branch into master follows the expected flow (master install, upgrade to feature branch) -
Test that a Draft MR from a feature branch into release branch follows the expected flow (release branch install, upgrade to feature branch)
Note for testing: you should be able to validate the flow based on the debug messages that show the branch being used.