Skip to content

Artifacts with multiple when-conditions

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

When trying to use multiple when-conditions on artifacts i do not receive the artifacts from the on_success condition, just from on_failure.

gitlab-ci.yml ---omitted compile: stage: compile image: $BASE script:

  • make all
  • make test

artifacts: when: on_success paths: - packages/blah.fxs expire_in: 1 hrs when: on_failure paths: - Makefile expire_in: 1 day

building.. make[1]: Leaving directory '...omitt....' Build succeeded

After the build succeeds the artifacts upload is not initiated from the looks of it(no output from the uploader), the build just 'passes' and moves on to the next stage. worth mentioning might be that there are multiple jobs as well. Also tried two instances of artifacts which also passes the CI-Lint , ie artifacs: when: on_success / artifacs: when: on_failure but no difference. not been able to find any clear documentation as to if this should work, but if not , then see this as a feature-request :)

Edited by 🤖 GitLab Bot 🤖