diff options
Diffstat (limited to 'spec/services/ci/pipeline_processing')
8 files changed, 57 insertions, 55 deletions
diff --git a/spec/services/ci/pipeline_processing/shared_processing_service.rb b/spec/services/ci/pipeline_processing/shared_processing_service.rb index bbd7422b435..215f33a42a3 100644 --- a/spec/services/ci/pipeline_processing/shared_processing_service.rb +++ b/spec/services/ci/pipeline_processing/shared_processing_service.rb @@ -843,12 +843,26 @@ RSpec.shared_examples 'Pipeline Processing Service' do create(:ci_build_need, build: deploy, name: 'linux:build') end - it 'makes deploy DAG to be waiting for optional manual to finish' do + it 'makes deploy DAG to be skipped' do expect(process_pipeline).to be_truthy - expect(stages).to eq(%w(skipped created)) + expect(stages).to eq(%w(skipped skipped)) expect(all_builds.manual).to contain_exactly(linux_build) - expect(all_builds.created).to contain_exactly(deploy) + expect(all_builds.skipped).to contain_exactly(deploy) + end + + context 'when FF ci_fix_pipeline_status_for_dag_needs_manual is disabled' do + before do + stub_feature_flags(ci_fix_pipeline_status_for_dag_needs_manual: false) + end + + it 'makes deploy DAG to be waiting for optional manual to finish' do + expect(process_pipeline).to be_truthy + + expect(stages).to eq(%w(skipped created)) + expect(all_builds.manual).to contain_exactly(linux_build) + expect(all_builds.created).to contain_exactly(deploy) + end end end 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 index 60f803bc3d0..96377b00c85 100644 --- 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 @@ -30,12 +30,12 @@ transitions: - event: success jobs: [build] expect: - pipeline: running + pipeline: success stages: build: success test: skipped - deploy: created + deploy: skipped jobs: build: success test: manual - deploy: created + deploy: skipped 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 index 4e4b2f22224..69640630ef4 100644 --- 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 @@ -30,12 +30,12 @@ transitions: - event: success jobs: [build] expect: - pipeline: running + pipeline: success stages: build: success test: skipped - deploy: created + deploy: skipped jobs: build: success test: manual - deploy: created + deploy: skipped 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 index fef28dcfbbe..8de484d6793 100644 --- 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 @@ -54,29 +54,29 @@ transitions: stages: build: success test: pending - review: created - deploy: created + review: skipped + deploy: skipped jobs: build: success test: pending release_test: manual - review: created - staging: created - production: created + review: skipped + staging: skipped + production: skipped - event: success jobs: [test] expect: - pipeline: running + pipeline: success stages: build: success test: success - review: created - deploy: created + review: skipped + deploy: skipped jobs: build: success test: success release_test: manual - review: created - staging: created - production: created + review: skipped + staging: skipped + production: skipped diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml index d8ca563b141..b8fcdd1566a 100644 --- a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml +++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml @@ -12,13 +12,13 @@ config: init: expect: - pipeline: created + pipeline: skipped stages: test: skipped - deploy: created + deploy: skipped jobs: test: manual - deploy: created + deploy: skipped transitions: - event: enqueue @@ -27,10 +27,10 @@ transitions: pipeline: pending stages: test: pending - deploy: created + deploy: skipped jobs: test: pending - deploy: created + deploy: skipped - event: run jobs: [test] @@ -38,21 +38,18 @@ transitions: pipeline: running stages: test: running - deploy: created + deploy: skipped jobs: test: running - deploy: created + deploy: skipped - event: drop jobs: [test] expect: - pipeline: running + pipeline: success stages: test: success - deploy: pending + deploy: skipped jobs: test: failed - deploy: pending - -# TOOD: should we run deploy? -# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080 + deploy: skipped diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml index ba0a20f49a7..a4a98bf4629 100644 --- a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml +++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml @@ -13,15 +13,12 @@ config: init: expect: - pipeline: created + pipeline: pending stages: test: skipped - deploy: created + deploy: pending jobs: test: manual - deploy: created + deploy: pending transitions: [] - -# TODO: should we run `deploy`? -# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080 diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml index d375c6a49e0..81aad4940b6 100644 --- a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml +++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml @@ -13,13 +13,13 @@ config: init: expect: - pipeline: created + pipeline: skipped stages: test: skipped - deploy: created + deploy: skipped jobs: test: manual - deploy: created + deploy: skipped transitions: - event: enqueue @@ -28,10 +28,10 @@ transitions: pipeline: pending stages: test: pending - deploy: created + deploy: skipped jobs: test: pending - deploy: created + deploy: skipped - event: drop jobs: [test] @@ -43,6 +43,3 @@ transitions: jobs: test: failed deploy: skipped - -# TODO: should we run `deploy`? -# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080 diff --git a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml index 34073b92ccc..a5bb103d1a5 100644 --- a/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml +++ b/spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds_deploy_needs_both.yml @@ -19,24 +19,21 @@ init: pipeline: pending stages: test: pending - deploy: created + deploy: skipped jobs: test1: pending test2: manual - deploy: created + deploy: skipped transitions: - event: success jobs: [test1] expect: - pipeline: running + pipeline: success stages: test: success - deploy: created + deploy: skipped jobs: test1: success test2: manual - deploy: created - -# TODO: should deploy run? -# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080 + deploy: skipped |