1
votes

We are in the process of moving our builds and release in azure devops over to the new yaml release pipelines but there are a couple of things we are used to having in the old, UI builds/releases that I can't figure out in the new yaml pipeline world.

In the old world, you would have a build linked to a release. You could create multiple release instances for a particular build, so if you had a build you knew was good but wanted to improve the release process, you could work on the release, creating a new instance of a release each time to test your changes, but not have to build fresh each time. You just selected the build number to link that release to each time.

But now with the yaml the build and release are integrated together, you create an instance of the entire pipeline each time. So how can I just run the 'release' part of the pipeline against a previous build? Or can I not? Likewise if I want to just run it against a particular environment? (we have different steps for deploying to ci and test, but to test changes to the test part I have to run the ci part every time which is very time consuming for debug)

1

1 Answers

1
votes

how can I just run the 'release' part of the pipeline against a previous build?

For this issue, you can add DownloadPipelineArtifact task to your stage job so that you can specify the previous build version as the source to deploy.

For example :

steps:
- task: DownloadPipelineArtifact@2
  displayName: 'Download Pipeline Artifact'
  inputs:
    buildType: specific
    project: 'proName'
    definition: 30
    buildVersionToDownload: specific
    pipelineId: 2118
    artifactName: drop

enter image description here

Likewise if I want to just run it against a particular environment?

For this issue , Azure devops released a new feature in sprint-162 : Skipping stages in a YAML pipeline

When you start a manual run, you may sometimes want to skip a few stages in your pipeline. The updated run pipeline panel presents a list of stages from the YAML file, and you have the option to skip one or more of those stages.

If Stages to run is not displayed in the web UI, please don’t worry, new features are rolled out gradually, these features will roll out over the next two to three weeks.

Here is a support ticket about the similar issue ,you can comment and vote there for more details. Hope the above helps.