Dev env is skipping

I’m looking for the reason why the DEV Environment is not executed immediately after the Testing stage. The general rule is that I have two pipelines: the first one does only Testing, then it triggers the second pipeline, which should perform the actual deployment using Terraform on the Dev Environment. The first part works, i.e., the first pipeline triggers the second one correctly, but the triggered one does not start the Dev Environment.

pipeline.yaml

name: MySource
resources:
  repositories:
    - repository: Library
      type: git
      name: Library
      ref: test/pipeline    
trigger:
  batch: true
  branches:
    include:
      - test/pipeline
parameters:
  - name: pipelineMode
    displayName: Pipeline Mode
    type: string
    default: main
    values:
      - auto
      - feature
      - main
      - release

<rest_of_the code>

It triggers that one below:

dependant_pipeline.yaml

trigger: none

resources:
  repositories:
    - repository: Library
      type: git
      name: Library
      ref: test/pipeline
  pipelines:
    - pipeline: test-triggered
      project: DEV
      source: 'library'
      trigger:
        branches:
          include:
            - test/pipeline
parameters:
  - name: pipelineMode
    displayName: Pipeline Mode
    type: string
    default: main
    values:
      - auto
      - feature
      - main
      - release
variables:
  - template: /templates/options.yml
stages:
  - stage: Testing
    displayName: Testing
  - template: /templates/build.yml
    parameters:
      pipelineOptions:
        pipelineMode: ${{variables.pipelineMode}}
        sourceBranchType: ${{variables['Pipeline.SourceBranchType']}}
        normalizedSourceBranch: $(Pipeline.NormalizedSourceBranch)
        isDeploymentPlanned: ${{variables.isDeploymentPlanned}}
        isDetectChangesEnabled: ${{ne(parameters.detectChangesFolders, '')}}
        isIgnoreServicePermissions: ${{parameters.ignoreServicePermissions}}
      devEnvironment: ${{parameters.devEnvironment}}
      devVariables: ${{parameters.devVariables}}
      tstEnvironment: ${{parameters.tstEnvironment}}
      tstVariables: ${{parameters.tstVariables}}
      tstTestTemplate: ${{parameters.tstTestTemplate}}
      tstTests: ${{parameters.tstTests}}
      intEnvironment: ${{parameters.intEnvironment}}
      intVariables: ${{parameters.intVariables}}
      prdEnvironment: ${{parameters.prdEnvironment}}
      prdVariables: ${{parameters.prdVariables}}
      environmentTemplate: ${{parameters.deployEnvironmentTemplate}}
      deployParameters: ${{parameters.deployParameters}}

The part of triggering one pipeline by another works, with some additional steps done on Azure DevOps.
For me issues starts somewhere below.

/templates/build.yml

<...>
stages:
  - ${{ if ne(parameters.devEnvironment, '') }}:
    - stage: DEV
      displayName: DEV Env
      dependsOn: Testing
      condition: and(succeeded(), eq('${{parameters.pipelineOptions.pipelineMode}}', 'main'))
      variables:
        - template: ${{parameters.devVariables}}
        - name: environment
          value: ${{parameters.devEnvironment}}
          readonly: true
        - name: env
          value: dev
          readonly: true
      pool:
        name: $(agentPool)
      jobs:
        - template: ${{parameters.environmentTemplate}}
          parameters:
            pipelineOptions: ${{parameters.pipelineOptions}}
            environment: ${{variables.environment}}
            env: ${{variables.env}}
            ${{each param in parameters.deployParameters}}:
              ${{param.key}}: ${{param.value}}
<...>

/templates/options.yml

parameters:
  - name: pipelineMode
    type: string

variables:
  - name: Pipeline
    value:
    readonly: true
  - name: Pipeline.NormalizedSourceBranch
    value:  ${{replace(replace(coalesce(variables['System.PullRequest.SourceBranch'], variables['Build.SourceBranch']),'refs/heads/',''),'/','__')}}
    readonly: true

  - name: Pipeline.SourceBranchType
    readonly: true
    ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/main') }}:
      value: "main"
    ${{ elseif startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}:
      value: "release"
    ${{ else }}:
      value: "feature"

  - name: pipelineMode
    readonly: true
    ${{ if eq(parameters.pipelineMode, 'auto') }}:
      value: ${{variables['Pipeline.SourceBranchType']}}
    ${{ else }}:
      value: ${{parameters.pipelineMode}}

For testing purposes, I created my own branch named test/pipeline, and I noticed that when I added it as a reference in the pipeline, the problems started. So, the cause is probably somewhere here. Previously, the pipeline was set to main, and the entire workflow worked without issues. However, I need to do this in my own branch, which is why test/pipeline is set in the pipeline.

I shortened the code to the part that I believe is causing the Dev Env not to execute. I hope I didn’t cut out too much.

With my many attempts all of them lead to the lack of Dev env. execution.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật