0
votes

We often want to test the first part of our release pipeline using a code from the branch. While I can easily trigger the build from any branch, not so with the release pipeline - I have no idea how to trigger it from anything else other than the branch specified in it.

So far my solution was to temporary clone the pipeline, redirect to another branch and use it while testing. Then delete it.

But I wonder if there is a better way. We use TFS 2018 (on-premises), so no YAML to show here.

This is how our pipeline looks like:

enter image description here

When I click the Source I get:

enter image description here

And the Continuous Deployment Trigger on the Source:

enter image description here

Now clicking the Build Artifact:

enter image description here

And the CD trigger:

enter image description here

The four smoketest5x are the same. They have two tasks (a ps1 script and to publish the test results) and their triggers are:

Pre-Deployment:

enter image description here

Post-Deployment:

enter image description here

Finally, the Production stage. Its pre-deployment trigger is the most interesting:

enter image description here

And there is manual approval.

It does not seem possible to provide the branch at release creation time, but maybe I am missing something here?

1
If you queue the release manually, then you have a dropdown to select which version of the build artifact you want to use. Is there some reason why that's not working for you?Vince Bowdren

1 Answers

1
votes

You can't specify a branch at release time. If you need to do that, create a build pipeline that publishes an artifact, then release a build. You can choose builds versions at deployment time.