5

I've got the following scenario:

updates branch develop -> triggers DEV-CI -> triggers Release X
updates branch master -> triggers QA-CI -> triggers Release X
updates branch release -> triggers Prod-CI -> triggers Release X

Inside "Release X" I added all 3 artifacts (dev, qa and prod) and 3 separate stages (dev, qa and prod). My goal was to publish to DEV if the branch develop is updated, to QA if master and so on, but release pipeline doesn't start because it requires all 3 artifacts to be available.

It only works if I only have 1-to-1, like this:

enter image description here

If I add the other artifacts, even after adding the artifact filters in the pre-deployment conditions for each specific artifact, the release won't start until all 3 are available.

Is it possible to do what I'm trying here or will I have to create one release per CI?

Thanks!

EDIT

After Li's answer I tried again, but it didn't work. Both environments were triggered, even though only QA CI had run.

This was the result: enter image description here

Here the QA release is downloading both artifacts, even though there's a specific artifact filter:

enter image description here

Here's the setup that generated that result:

enter image description here

enter image description here

enter image description here

enter image description here

eestein
  • 4,914
  • 8
  • 54
  • 93

2 Answers2

1

I had tested recently and these artifact filters are tightly coupled with a repository branch which means that if you have 2 artifacts from the same branch then it will trigger all stages where you have that branch reference in artifact filteration.

You must use GATES to do such artifact filteration.

Abhishek Sakhuja
  • 197
  • 2
  • 16
-1

I tested the following settings. Enable Continuous deployment trigger for each build artifact, and set artifact filter for each stage.

enter image description here

enter image description here

When the dev build runs successfully, the Dev stage is triggered normally.

enter image description here

enter image description here

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • 1
    Hi, thank you. I think I did exactly that and it didn't work, but I'm going to try it again and will get back with the results. Thanks. – eestein Apr 29 '21 at 09:49
  • 1
    Hi Li, I just tested and it didn't work. Please see my updated question. Did I do something wrong? – eestein Apr 29 '21 at 10:12
  • Okay, I can reproduce your problem [image1](https://i.stack.imgur.com/svrwy.png) [image2](https://i.stack.imgur.com/H3Q2Z.png). This is because the branch I specified in the artifact filter of the other stage is inconsistent with the source branch in the build artfiact, so it is not triggered. I will look for a solution that suits your situation, and I will update it here if there is progress – Hugh Lin Apr 30 '21 at 06:00
  • 1
    Thank you! For the time being, I created one release per stage. – eestein Apr 30 '21 at 10:02
  • Here is the solution that we have adopted: We are using one type of release for multiple environments through YAML. – Abhishek Sakhuja Oct 12 '21 at 09:52