1 minute read

A couple of days ago I started developing extensions for Build and Release pipelines of Visual Studio Team Services (VSTS). One of these extensions is finished and I wanted to share it with the community.

 

VSTS Extension

The extension that I created is a build or release tasks that can be used to extract the raw file content and place that content within a variable. The task itself only needs two properties:

  • File path: Path to the file from which you want to extract the file content.
  • Variable Name: The name of the variable wherein you want to place the file content.

 

VSTS - File Content to Variable

 

Use Case

An example use case for this extension is saving the content of a query (during a project we extracted the query from a “.asaql” file) into a variable and used that variable to override a parameter within our Azure Resource Management Template. With this setup we configured a Release Pipeline for our Stream Analytics service.

Links

 

GitHubhttps://github.com/MaikvanderGaag/msft-vsts-extensions

Marketplacehttps://marketplace.visualstudio.com/items?itemName=maikvandergaag.maikvandergaag-file-to-variable

Issueshttps://github.com/MaikvanderGaag/msft-vsts-extensions/issues