How can I have testing or beta script packages for my step templates?

I have several dozen step templates that run scripts. I’d like to move those scripts over to GitHub. This way I can get all the benefits of source control for my scripts.

However, my concern is I want to be able to test my scripts in Octopus using a feature branch. I don’t want to create a new step template just to test them. Is it possible to have a single step template reference two packages?

Yes, that is possible. In a sense you will be creating two packages. One package will be for your “master” branch and the other package will be for your “beta” branch.

image

In the step template, create a variable to store the name of the branch you wish to use. Default that to Master.

Then reference that variable in the package selection in the step template.
image

For non-test projects, the branch name will remain as the default.
image

When a release is created it will find the version 1.0.0.2 of that package.
image

For the test project change that branch name to Beta.
image

Anytime a release is created for that project it will use the Beta package instead. In this case it found the latest version for that, which is 1.0.0.3.
image