1
votes

I have two pipelines one is primary which triggers the other. How to pass a variable set on the first pipeline to second triggered one.

Example: Variable-Name: Validate = True

I want to pass the validate variable to secondary triggered pipeline . I could not find any documentation that would help.

1
Do you have questions related to this ticket?starian chen-MSFT

1 Answers

3
votes

You could store the necessary value to a file, then include this file in current build's artifact (Publish pipeline artifact task).

Then in secondly pipeline, you could add Download Pipeline Artifacts task to download latest artifact of first build and read the content of necessary file.

If you are using pipeline resource (could enable trigger), please add Download task to download artifact of that pipeline resource.

Resources: pipelines