I have the following gitlab pipeline as below:
stages:
  - code-analyze
  - build
  - setup
  - test
  - teardown
check-style:
  extends: .base
  stage: code-analyze
  script: ./gradlew styleCheck
build-code:
  extends: .base
  stage: build
  script: ./gradlew build
buid-infra:
  extends: .base
  stage: setup
  script: echo "run setup infra"
run-integration-test:
  extends: .base
  stage: test
  script: echo "run integration test"
  needs: [buid-infra]
run-performance-test:
  extends: .base
  stage: test
  script: echo "run performance test"
  needs: [buid-infra]
teardown:
  extends: .base
  stage: teardown
  script: echo "run teardown"
  needs: [buid-infra]
I want to run teardown step even in cases where build-infra OR run-integration-test OR
run-performance-test fails. I dunt want to use allow_failure since it does not mark the pipeline as failed. Is there a way to achieve such a workflow in gitlab CI ?