TedOnTheNet
TedOnTheNet

Reputation: 1102

Visual Studio Team Services (VSTS): write release information to file?

I've created a release definition in VSTS. After I deploy my application to the app service, I want to have the information about the release shown in my application. My application currently reads a file releaseinfo.json from the app_data folder which needs to be filled during the release process in VSTS.

Does anybody know how to get this information (like the release number and description) into the file from VSTS? Or is there another way to get this info into my application?

Upvotes: 0

Views: 391

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

There are many ways to save the release information in a file, for example, PowerShell programing.

There is the Replace Tokens task that can do it easily, it can replace the token in the file (e.g. #{releaseInfo}#) to the variable value (e.g. releaseInfo), you can use the pre-defined variable, for example Release.ReleaseId (#{Release.ReleaseId}#).

Upvotes: 2

Harshil Lodhi
Harshil Lodhi

Reputation: 7762

You can get all the release related info from the environment variables. You can read it in a powershell/bash task and write it back in the required format

See the variables documentation for more info

Upvotes: 0

Related Questions