Only start an Azure DevOps release stage if a specific artifact exists

%3CLINGO-SUB%20id%3D%22lingo-sub-3027497%22%20slang%3D%22en-US%22%3EOnly%20start%20an%20Azure%20DevOps%20release%20stage%20if%20a%20specific%20artifact%20exists%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3027497%22%20slang%3D%22en-US%22%3E%3CP%3EIn%20Azure%20DevOps%2C%20I%20have%20one%20build%20pipeline%20that%20runs%20which%20could%20produce%201%20or%202%20artifacts%20I%20want%20to%20release.%20Lets%20call%20them%20Artifact1%20and%20Artifact2.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EIs%20it%20possible%20to%20have%20one%20release%20pipeline%20with%20multiple%20stages%20that%20only%20start%20if%20a%20specific%20artifact%20exists%3F%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3ESo%20if%20Artifact1%20was%20produced%2C%20run%20the%20Stage%20Artifact1Stage%2C%20but%20not%20Artifact2Stage.%3C%2FP%3E%3CP%3EI%20see%20there%20are%20branch%20filters%20in%20DevOps%2C%20but%20that%20doesn't%20get%20me%20what%20I%20want.%20I%20want%20to%20filter%20on%20the%20artifact%20produced.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20Deployment%20group%20job%20(in%20a%20stage)%20there%20is%20an%20Artifact%20download%20option%20which%20allows%20me%20to%20select%20the%20specific%20artifact%20I%20want%2C%20but%20this%20doesn't%20prevent%20the%20stage%20from%20running%20(and%20then%20failing%20if%20the%20specific%20artifact%20wasn't%20produced).%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

In Azure DevOps, I have one build pipeline that runs which could produce 1 or 2 artifacts I want to release. Lets call them Artifact1 and Artifact2.

 

Is it possible to have one release pipeline with multiple stages that only start if a specific artifact exists? So if Artifact1 was produced, run the Stage Artifact1Stage, but not Artifact2Stage.

I see there are branch filters in DevOps, but that doesn't get me what I want. I want to filter on the artifact produced.

 

In the Deployment group job (in a stage) there is an Artifact download option which allows me to select the specific artifact I want, but this doesn't prevent the stage from running (and then failing if the specific artifact wasn't produced).

0 Replies