powershellazure-devopstfsazure-pipelinestfvc

Using powershell in pipeline how to get shelveset number using which pipeline run got triggered in azure devops


Using powershell in pipeline how to get shelveset number using which pipeline run got triggered in azure devops. Tfs repos. I want to know how to get shelve set number.


Solution

  • Review the documentation. There is a predefined variable containing that information, you don't need to do anything to retrieve it.

    Build.SourceTfvcShelveset

    Defined if your repository is Team Foundation Version Control. If you are running a gated build or a shelveset build, this is set to the name of the shelveset you are building. Note: This variable yields a value that is invalid for build use in a build number format.