summaryrefslogtreecommitdiff
path: root/spec/services/ci/pipeline_processing/test_cases
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/pipeline_processing/test_cases')
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test_when_always.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_always.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_fails_with_allow_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_allow_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_on_failure_deploy_needs_test.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_fails_with_allow_failure_test_on_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_build_allow_failure_test_on_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_both.yml41
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_test.yml41
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_succeeds_test_on_failure_deploy_needs_test.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_success.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_build_test_manual_review_deploy.yml82
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test_when_always.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_always.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_deploy_needs_empty.yml27
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_test_fails_with_allow_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_test_allow_failure_true.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_always.yml45
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_on_failure.yml45
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_other_test_succeeds_deploy_needs_both.yml40
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml (renamed from spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_on_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_build_fails_with_allow_failure_test_on_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/stage_build_allow_failure_test_on_failure.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_manual_allow_failure_true.yml (renamed from spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_allow_failure.yml)17
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_on_failure.yml (renamed from spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_success.yml)0
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_build_test_manual_review_deploy.yml79
-rw-r--r--spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_always.yml23
23 files changed, 432 insertions, 8 deletions
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test.yml
index a133023b12d..a133023b12d 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_always.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test_when_always.yml
index 4c676761e5c..4c676761e5c 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_always.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_needs_one_build_and_test_when_always.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_allow_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_fails_with_allow_failure.yml
index ea7046262c3..ea7046262c3 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_allow_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_fails_with_allow_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_on_failure_deploy_needs_test.yml
index 5ace621e89c..5ace621e89c 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_on_failure_deploy_needs_test.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_allow_failure_test_on_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_with_allow_failure_test_on_failure.yml
index cfc456387ff..cfc456387ff 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_build_allow_failure_test_on_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_fails_with_allow_failure_test_on_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_both.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_both.yml
new file mode 100644
index 00000000000..60f803bc3d0
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_both.yml
@@ -0,0 +1,41 @@
+config:
+ build:
+ stage: build
+ script: exit 0
+
+ test:
+ stage: test
+ when: manual
+ allow_failure: true
+ script: exit 1
+
+ deploy:
+ stage: deploy
+ script: exit 0
+ needs: [build, test]
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ build: pending
+ test: created
+ deploy: created
+ jobs:
+ build: pending
+ test: created
+ deploy: created
+
+transitions:
+ - event: success
+ jobs: [build]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: skipped
+ deploy: created
+ jobs:
+ build: success
+ test: manual
+ deploy: created
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_test.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_test.yml
new file mode 100644
index 00000000000..4e4b2f22224
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeds_test_manual_allow_failure_true_deploy_needs_test.yml
@@ -0,0 +1,41 @@
+config:
+ build:
+ stage: build
+ script: exit 0
+
+ test:
+ stage: test
+ when: manual
+ allow_failure: true
+ script: exit 0
+
+ deploy:
+ stage: deploy
+ script: exit 0
+ needs: [test]
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ build: pending
+ test: created
+ deploy: created
+ jobs:
+ build: pending
+ test: created
+ deploy: created
+
+transitions:
+ - event: success
+ jobs: [build]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: skipped
+ deploy: created
+ jobs:
+ build: success
+ test: manual
+ deploy: created
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_success.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeeds_test_on_failure_deploy_needs_test.yml
index 19524cfd3e4..19524cfd3e4 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_success.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_succeeds_test_on_failure_deploy_needs_test.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_build_test_manual_review_deploy.yml b/spec/services/ci/pipeline_processing/test_cases/dag_build_test_manual_review_deploy.yml
new file mode 100644
index 00000000000..fef28dcfbbe
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_build_test_manual_review_deploy.yml
@@ -0,0 +1,82 @@
+config:
+ stages: [build, test, review, deploy]
+
+ build:
+ stage: build
+ script: exit 0
+
+ test:
+ stage: test
+ script: exit 0
+
+ release_test:
+ stage: test
+ when: manual
+ allow_failure: true
+ script: exit 0
+
+ review:
+ stage: review
+ script: exit 0
+ needs: [test, release_test]
+
+ staging:
+ stage: deploy
+ script: exit 0
+ needs: [test, release_test]
+
+ production:
+ stage: deploy
+ script: exit 0
+ needs: [review]
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ build: pending
+ test: created
+ review: created
+ deploy: created
+ jobs:
+ build: pending
+ test: created
+ release_test: created
+ review: created
+ staging: created
+ production: created
+
+transitions:
+ - event: success
+ jobs: [build]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: pending
+ review: created
+ deploy: created
+ jobs:
+ build: success
+ test: pending
+ release_test: manual
+ review: created
+ staging: created
+ production: created
+
+ - event: success
+ jobs: [test]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: success
+ review: created
+ deploy: created
+ jobs:
+ build: success
+ test: success
+ release_test: manual
+ review: created
+ staging: created
+ production: created
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test.yml
index f324525bd56..f324525bd56 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_always.yml b/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test_when_always.yml
index 9986dbaa215..9986dbaa215 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_always.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_needs_one_build_and_test_when_always.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_deploy_needs_empty.yml b/spec/services/ci/pipeline_processing/test_cases/dag_deploy_needs_empty.yml
new file mode 100644
index 00000000000..1783c0acb11
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_deploy_needs_empty.yml
@@ -0,0 +1,27 @@
+config:
+ build:
+ stage: build
+ script: exit 0
+
+ test:
+ stage: test
+ script: exit 0
+
+ deploy:
+ stage: deploy
+ script: exit 0
+ needs: []
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ build: pending
+ test: created
+ deploy: pending
+ jobs:
+ build: pending
+ test: created
+ deploy: pending
+
+transitions: []
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_allow_failure_true.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_fails_with_allow_failure.yml
index 8d4d9d403f1..8d4d9d403f1 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_test_allow_failure_true.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_fails_with_allow_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_always.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_always.yml
new file mode 100644
index 00000000000..bb8723aa303
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_always.yml
@@ -0,0 +1,45 @@
+config:
+ test:
+ stage: test
+ when: manual
+ allow_failure: false
+ script: exit 1
+
+ deploy:
+ stage: deploy
+ when: always
+ script: exit 0
+ needs: [test]
+
+init:
+ expect:
+ pipeline: manual
+ stages:
+ test: manual
+ deploy: created
+ jobs:
+ test: manual
+ deploy: created
+
+transitions:
+ - event: enqueue
+ jobs: [test]
+ expect:
+ pipeline: pending
+ stages:
+ test: pending
+ deploy: created
+ jobs:
+ test: pending
+ deploy: created
+
+ - event: drop
+ jobs: [test]
+ expect:
+ pipeline: running
+ stages:
+ test: failed
+ deploy: pending
+ jobs:
+ test: failed
+ deploy: pending
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_on_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_on_failure.yml
new file mode 100644
index 00000000000..3099a94befb
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_deploy_on_failure.yml
@@ -0,0 +1,45 @@
+config:
+ test:
+ stage: test
+ when: manual
+ allow_failure: false
+ script: exit 1
+
+ deploy:
+ stage: deploy
+ when: on_failure
+ script: exit 0
+ needs: [test]
+
+init:
+ expect:
+ pipeline: manual
+ stages:
+ test: manual
+ deploy: created
+ jobs:
+ test: manual
+ deploy: created
+
+transitions:
+ - event: enqueue
+ jobs: [test]
+ expect:
+ pipeline: pending
+ stages:
+ test: pending
+ deploy: created
+ jobs:
+ test: pending
+ deploy: created
+
+ - event: drop
+ jobs: [test]
+ expect:
+ pipeline: running
+ stages:
+ test: failed
+ deploy: pending
+ jobs:
+ test: failed
+ deploy: pending
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_other_test_succeeds_deploy_needs_both.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_other_test_succeeds_deploy_needs_both.yml
new file mode 100644
index 00000000000..7330a73b5a3
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false_other_test_succeeds_deploy_needs_both.yml
@@ -0,0 +1,40 @@
+config:
+ test1:
+ stage: test
+ script: exit 0
+
+ test2:
+ stage: test
+ when: manual
+ allow_failure: false
+ script: exit 1
+
+ deploy:
+ stage: deploy
+ script: exit 0
+ needs: [test1, test2]
+
+init:
+ expect:
+ pipeline: running
+ stages:
+ test: running
+ deploy: created
+ jobs:
+ test1: pending
+ test2: manual
+ deploy: created
+
+transitions:
+ - event: success
+ jobs: [test1]
+ expect:
+ pipeline: manual
+ stages:
+ test: manual
+ deploy: created
+ jobs:
+ test1: success
+ test2: manual
+ deploy: created
+
diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml
index 34073b92ccc..34073b92ccc 100644
--- a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_failure.yml b/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_on_failure.yml
index 1751cbb2023..1751cbb2023 100644
--- a/spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_on_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_build_allow_failure_test_on_failure.yml b/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_with_allow_failure_test_on_failure.yml
index 3e081d4411b..3e081d4411b 100644
--- a/spec/services/ci/pipeline_processing/test_cases/stage_build_allow_failure_test_on_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_with_allow_failure_test_on_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_allow_failure.yml b/spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_manual_allow_failure_true.yml
index 362ac6e4239..2fd85b74d4d 100644
--- a/spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_allow_failure.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_manual_allow_failure_true.yml
@@ -1,10 +1,11 @@
config:
build:
stage: build
- script: exit 1
+ script: exit 0
test:
stage: test
+ when: manual
allow_failure: true
script: exit 1
@@ -25,15 +26,15 @@ init:
deploy: created
transitions:
- - event: drop
+ - event: success
jobs: [build]
expect:
- pipeline: failed
+ pipeline: running
stages:
- build: failed
+ build: success
test: skipped
- deploy: skipped
+ deploy: pending
jobs:
- build: failed
- test: skipped
- deploy: skipped
+ build: success
+ test: manual
+ deploy: pending
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_success.yml b/spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_on_failure.yml
index 15afe1ce8e1..15afe1ce8e1 100644
--- a/spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_success.yml
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_build_succeeds_test_on_failure.yml
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_build_test_manual_review_deploy.yml b/spec/services/ci/pipeline_processing/test_cases/stage_build_test_manual_review_deploy.yml
new file mode 100644
index 00000000000..2829765fd95
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_build_test_manual_review_deploy.yml
@@ -0,0 +1,79 @@
+config:
+ stages: [build, test, review, deploy]
+
+ build:
+ stage: build
+ script: exit 0
+
+ test:
+ stage: test
+ script: exit 0
+
+ release_test:
+ stage: test
+ when: manual
+ allow_failure: true
+ script: exit 0
+
+ review:
+ stage: review
+ script: exit 0
+
+ staging:
+ stage: deploy
+ script: exit 0
+
+ production:
+ stage: deploy
+ script: exit 0
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ build: pending
+ test: created
+ review: created
+ deploy: created
+ jobs:
+ build: pending
+ test: created
+ release_test: created
+ review: created
+ staging: created
+ production: created
+
+transitions:
+ - event: success
+ jobs: [build]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: pending
+ review: created
+ deploy: created
+ jobs:
+ build: success
+ test: pending
+ release_test: manual
+ review: created
+ staging: created
+ production: created
+
+ - event: success
+ jobs: [test]
+ expect:
+ pipeline: running
+ stages:
+ build: success
+ test: success
+ review: pending
+ deploy: created
+ jobs:
+ build: success
+ test: success
+ release_test: manual
+ review: pending
+ staging: created
+ production: created
diff --git a/spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_always.yml b/spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_always.yml
new file mode 100644
index 00000000000..9181c8adf50
--- /dev/null
+++ b/spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_always.yml
@@ -0,0 +1,23 @@
+config:
+ test:
+ stage: test
+ when: manual
+ allow_failure: true
+ script: exit 1
+
+ deploy:
+ stage: deploy
+ when: always
+ script: exit 0
+
+init:
+ expect:
+ pipeline: pending
+ stages:
+ test: skipped
+ deploy: pending
+ jobs:
+ test: manual
+ deploy: pending
+
+transitions: []