TFS Release Control Arguments Not Available

We want to use TFS 2015.3 Release Management to package / deploy our software. For one of our release tasks, we need access to Release Artifact Variables in one of our Powershell scripts.

But each time we try to access one of these variables RELEASE_ARTIFACTS_ [source-alias] _BUILDNUMBER, for example, the following error message appears:

[error] The term Release_Artifacts_ [source-alias] _BUILDNUMBER is not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling of the name or if the path was included, check the path and try again.

I already tried to print all available environment variables using the built-in powershell script with the following expression: Get-ChildItem Env :. But these variables were not in any case.

Are there any known issues when using Release Artifact variables?

+4
source share
2 answers

Release Artifacts variables do not seem to be available for TFS on-prem; I tested the same script with VSTS and with TFS2015.3.

In the VSTS release, you can see the release variables at the initialization stage, while in the on-prem release these variables are missing:

enter image description here

enter image description here

+4
source

You use predefined form variables with release control artifacts:

RELEASE_ARTIFACTS_[source-alias]_[variable-name]

[source-alias] , . .

enter image description here

, :

  • Inline Script . env:RELEASE_ARTIFACTS_[ScrumProject]_[BUILDNUMBER]
  • . : Release.Artifacts.[source-alias].[variable-name]

. MSDN: Microsoft Release Management

, ds19. , TFS2015 update3, VSTS.


Update

build.artifactstagingdirectory , TFS . , powershell script , TFS Build vNext

+3

Source: https://habr.com/ru/post/1654090/


All Articles