1

I have a multi-configuration web application I'm using parallel deployments, leveraging Task Groups for reusing my deployment code.

I've been using Powershell tasks and the ##vso[task.setvariable variable] but those only are readable by other tasks (particularly non-PowerShell tasks) if they correspond to top-level variables at the Build/Release level. Variables that are only local to the task-group.

Basically, the behavior described in Issue #3116

Does anybody have a better workaround for this issue besides binding all your variables right to the root with identical names?

1 Answer 1

1

I'm not sure my approach is any "better". However, what I have done in the past was to use Table Storage or Cosmos DB to store the key-value pairs that needed to be persisted between each stage.

The general schema was:

  • Key: buildNum-variableName
  • Value: variableValue

I then created various wrappers for the SDK to access from PowerShell and MSBuild, this also enabled chaining multiple builds together to create a CI/CD pipeline.

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.