Issues
Issues copied to clipboard
When using Git source, scoping the branch variable causes unresolvable variable error on create release or runbook run
Severity
Low
Version
2024.1.4490-hotfix.5037
Latest Version
I could reproduce the problem in the latest build
What happened?
Scoping
a bound Branch variable when sourcing from Git repository as a source causes error as #{TheVariable} is not evaluated before the Runbook run or create release.
Scoping:
Error:
Unscoped evaluates fine and allows Runbook run or create release to be saved:
Create release:
Reproduction
Steps to reproduce:
- Create a custom script step in a Runbook
- Choose Git as the script source
- Populate everything to use the Git repository
- Set the branch parameter to an Octopus variable
- Create the Octopus variable and add any scope
- Attempt to run the Runbook
Error and Stacktrace
There was a problem with your request.
Unable to retrieve commit details from the provided Git repository at 'https://github.com/garrettdass/garrettdass-repo', for branch '#{BranchVariable}'. Ensure that the Uri and credentials are correct, and try again.
One or more steps with Git resources contain variables which are not resolvable at release creation:
Run a Script
More Information
Customer report: Internal Ticket
Workaround
Unscope Branch variable
I am also experiencing this issue when trying to create a release via the CLI.
Interestingly, it works when I use the UI. It doesn't however, work when I use the CLI.
Which all of our processes and deployments are built around the CLI and not creating releases in the UI. So we would love to see this issue fixed.
It prevents us from testing changes in a branch to a script step template that uses git repository as the script source. Instead, as a workaround I am having to duplicate step templates for each branch in order to test changes to them. Then once I am done with the changes to the scripts I have to manually copy my changes into the right step template. Which gets messy and cumbersome.
The only difference between OP and our implementation is we add a parameter to the script step template. And then reference the parameter in the branch settings. Then when we use the step template in a project's process. We type the parameter in:
Release Note: Fixed issue where creating a Release or Runbook Snapshot fails if one or more steps have a git dependency referencing variables
:tada: The fix for this issue has been released in:
Release stream | Release |
---|---|
2024.3 | 2024.3.10989 |
2024.4+ | all releases |