Closed araemo closed 4 years ago
Here is a reference for output variables: https://github.com/Microsoft/azure-pipelines-agent/blob/master/docs/preview/outputvariable.md
Added a pull request that I think would do this. I think it would also work with Set-VstsTaskVariable instead of the write-host ##vso macro.
PR merged, copied line to other version also, updated version and published.
Thanks. I ran a test, and it does work, though not as I expected.
The variable, for the first gitclone task, for repo named "Repo.Name" ends up named: GITCLONE1_GITCLONE_REPO_NAME and for the second gitclone task, for a repo named "Another.Repo" it ends up as: GITCLONE2_GITCLONE_ANOTHER_REPO
So, we could probably remove the GitClone from the output line, since GITCLONE# gets prepended automatically by pipelines, and it just ends up being redundant.
Just published a new version with the new variable names as suggested. Thanx for testing! :)
Would it be possible to set an environment variable with the path to the checked out repo?
Something like: GitClone_RepoName = "D:\fully-qualified\path"