Instead of hardcoding the master branch as the branch to checkout when cloning the pack CI repository, use environment variables to set the branch name to checkout, and use Bash variable reference magic to maintain reverse compatibility.
This PR will make it easier and faster to troubleshoot and test changes to the CI repository when pack CI fails. With this change, checking out a different branch of the ci repository for a pack CI run is as easy as setting the CI_BRANCH environment variable in CircleCI config and rerunning the workflow.
Note that this change will only apply to future packs that are forked off of this repository. It will not retroactively apply to packs that already exist before this is merged.
Instead of hardcoding the
master
branch as the branch to checkout when cloning the pack CI repository, use environment variables to set the branch name to checkout, and use Bash variable reference magic to maintain reverse compatibility.This PR will make it easier and faster to troubleshoot and test changes to the CI repository when pack CI fails. With this change, checking out a different branch of the
ci
repository for a pack CI run is as easy as setting theCI_BRANCH
environment variable in CircleCI config and rerunning the workflow.Note that this change will only apply to future packs that are forked off of this repository. It will not retroactively apply to packs that already exist before this is merged.