Add two spec examples of canceled CI builds
What does this MR do and why?
This MR adds test cases for this;
The canceled
and failed
statuses sometimes behave the same, sometimes not...
- Both statuses are sometimes considered "failed". When a job is
failed
orcanceled
withallow_failure: true
, we mark their stage/pipeline as "success with warning".
For this example;
build:
stage: build
script: sleep 10
allow_failure: true
test:
stage: test
script: exit 0
- If
build
is canceled,test
runs. - If
build
is failed,test
runs.
- Sometimes they are different.
on_failure
only looks forfailed
for the previous status, notcanceled
.
For this example;
build:
stage: build
script: sleep 10
test:
stage: test
script: exit 0
when: on_failure
- If
build
is canceled,test
is skipped. - If
build
is failed,test
runs.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Furkan Ayhan