CI / CD deployment conditions do not start

I have been struggling with this for more than a day. I have a simple requirement inside the VSTS CI / CD pipeline that I am trying to build that any branch following a template release/*or hotfix/*should initiate deployment in my QA environment. Here is my branch based configuration:

enter image description here

This configuration does not start the deployment as expected. As you can see in the screenshot below, the release started, but did not work in any of my environments. (QA is the second gray square on the right and should be green or red depending on whether the deployment was successful or unsuccessful).

enter image description here

In an attempt to get around this, I tried using Build Tags instead. I added a Powershell step, which conditionally adds Build Tags based on the branch name.

$branchName = $Env:BUILD_SOURCEBRANCH

if ($branchName -like '*release/*')
{
    Write-Host "##vso[build.addbuildtag]release"
}

if ($branchName -like '*hotfix/*')
{
    Write-Host "##vso[build.addbuildtag]hotfix"
}

, , . , , :

enter image description here enter image description here

EDIT: , CI Get Sources. . "".

Get CI Config Source Files CI Triggers

+1
1

, , VSTS "AND", "OR". : "Artifact Branch from Release/*" AND "Artifact Branch from Feature/*", . "Release 28", "i", , . , , , .

enter image description here

- QA, .

+1

Source: https://habr.com/ru/post/1670990/


All Articles