Problem with pipeline canceling

Hello.
I have a problem with the GitLab pipeline.
I expected the job BUILD-ETDCS to fail.
How to fix it?

GitLab: self-managed
Runners: Ubuntu Linux, Windows

.gitlab-ci.yaml:

stages:
  - unit-tests
  - build
  - integration-test

unit-test-job:   
  stage: unit-tests    
  script:
    - echo "Running unit testing... This will take a while."
    ////... any code
  tags:
    - win32-msvc

BUILD-ETDCS:
  stage: build
  needs:
    - job: unit-test-job
  when: always
  script:
    - ./build.sh 
  tags:
    - linux-oe-g++
  variables:
    GIT_SUBMODULE_STRATEGY: recursive

BUILD-CONFIG_TOOLS:
  stage: build
  needs:
    - job: unit-test-job
  script:
    - echo "Compiling the code..."
    ////... any code
  tags:
    - win32-msvc
  artifacts:
    paths:
      - build/bin
    expire_in: 30 mins
  variables:
    GIT_SUBMODULE_STRATEGY: recursive

integration-test-job:   
  stage: integration-test    
  script:
    - echo "Running integration tests... This will take a while."
      ////... any code
  tags:
    - win32-msvc
  needs:
    - job: BUILD-CONFIG_TOOLS
      artifacts: true

Hi,

can you inspect the job which seems paused? Maybe the error is different, unrelated to the pipeline job failing earlier. For example, that there are no runners available which could execute this job with the tag linux-oe-g++.

Depending in how your runners are registered, either inspect instance, group or project level settings for CI/CD to verify them checking in, and the tags assigned.

Cheers,
Michael

@dnsmichi Thanks for your reply.
I expected - when the job unit-tests are failed then the pipeline is canceled/braked. But it did not happen. How do script it so as to with my expectations?

Before you start investigating the script, let’s figure out why the BUILD-ETDCS is paused (the yellow icon). As said, I suspect that the pipeline itself may have a problem, with no runners available to take on the job. Can you navigate into the job details and share a screenshot?

Cheers,
Michael