So I'm automating a process we currently have where we deploy a database and then have an exe that 'activates' the database. The default values are different for each product and is determined by a cmd line arg.

I've created 3 VSTS Release environments based on the hardware IO board for the environment. How can I pass in this product flag at deploy time as it isn't dependent on the environment or release itself.

Edit: The product flag value isn't known until the database is deployed into an environment, and value can not be set in the release definition creation time or at release time. Only when deployed into a particular environemnt

2 Answers 2


While you can use the Release Description field the moment you Start a Release

enter image description here

which fills in the $(Release.ReleaseDescription) variable, I discourage this approach.

The whole point of a Release Pipeline is to automate and having users inputting data is against this approach. If you do not trust VSTS for Secrets, you can store them in Azure KeyVault or similar and pull them down while releasing. It is not a chance that there are Tasks to facilitate this.

  • It isn't an issue with trust, this variable value just isn't known until it is deployed into an environment, not when a release is created. so this wouldn't work.
    – xtreampb
    Jul 20, 2018 at 14:11
  • This was not clear in your Q: please go back and edit it. Jul 20, 2018 at 14:21

Closing this issue as we were able to modify the process with the teams involved to be able to define the variable when the release is created.

Our answer is to modify the existing process and accompanying software to remove this need

Edit: To clairify the software that activated the database was re-written to allow CLI variables to be passed, which can be set for each environment.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.