Problem to solve
Hi! I’m trying to create a ci job that takes all the artifacts containing test results from a number of test jobs, and creates an aggregated test report matrix. That means I need to fetch test results from a job that failed as well, and I’m having troubles achieving this. The test report job is always skipped if a job prior has failed. Is there anyway around this?
Steps to reproduce
I’ve created this test pipeline:
fake_1:
stage: build
needs: []
script:
- echo "TEST1" >> test1.log
- exit 1
artifacts:
when: always
paths:
- test1.log
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_TAG == 'nightly'
fake_2:
stage: build
needs: []
script:
- echo "TEST2" >> test2.log
- exit 0
artifacts:
when: always
paths:
- test2.log
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_TAG == 'nightly'
report_depends:
stage: deploy
dependencies:
- fake_1
- fake_2
script:
- # create test report
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_TAG == 'nightly'
report_needs:
stage: deploy
needs:
- job: fake_1
artifacts: true
- job: fake_2
artifacts: true
script:
- # create test report
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_TAG == 'nightly'
report_none:
stage: deploy
script:
- # create test report
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_BUILD_TAG == 'nightly'
This leads to all jobs in deploy stage being skipped:
Is there any way of achieving what I’m trying to do? I could probably do this by storing the job artifacts in package registry, but this feels a little cumbersome. Using allow_failure
has no other effect.