Issues icon indicating copy to clipboard operation
Issues copied to clipboard

Unable to bind variable to repo URL for git sourced scripts

Open KennethBates opened this issue 1 year ago • 1 comments

Severity

One report

Version

reported in 2024.2.9253 and reproduced in 2024.3.5388

Latest Version

None

What happened?

Attempting to bind the repository URL to a variable in a git-sourced script step is unable to evaluate the variable value at release/snapshot creation.

Reproduction

  1. Create a variable holding the value of the URL to your git repo (e.g. https://github.com/OctopusDeploy/OctopusClients.git)
  2. Configure a script step sourcing the script from a git repository
  3. Bind the Repository URL field to the repo variable
  4. Attempt to create a release

image

Error and Stacktrace

Unable to retrieve commit details from the provided Git repository at '#{repo}', for branch 'main'. Ensure that the Uri and credentials are correct, and try again.

More Information

No response

Workaround

Specify the repo URL directly in the script step instead of binding to a variable holding that same value.

KennethBates avatar Jul 08 '24 04:07 KennethBates

I've run into this same issue.

SeanLively avatar Jul 17 '24 15:07 SeanLively

Unable to reproduce in 2024.3.12751 and 2024.4.2718, but the deployment will fail due to https://github.com/OctopusDeploy/Issues/issues/9033

patrick-smergut-octopus avatar Sep 27 '24 17:09 patrick-smergut-octopus