Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
93952e6d
Commit
93952e6d
authored
Apr 24, 2020
by
Furkan Ayhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement new way to test ci process pipeline service
With this, we can easily write test cases
parent
b379cb19
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1412 additions
and
0 deletions
+1412
-0
spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
.../ci/pipeline_processing/atomic_processing_service_spec.rb
+4
-0
spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb
.../ci/pipeline_processing/legacy_processing_service_spec.rb
+3
-0
spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
...e_processing/shared_processing_service_tests_with_yaml.rb
+53
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_allow_failure_test_on_failure.yml
...ng/test_cases/dag_build_allow_failure_test_on_failure.yml
+47
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails.yml
...ces/ci/pipeline_processing/test_cases/dag_build_fails.yml
+39
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_deploy_needs_test.yml
...ocessing/test_cases/dag_build_fails_deploy_needs_test.yml
+39
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_deploy_needs_test_when_always.yml
...t_cases/dag_build_fails_deploy_needs_test_when_always.yml
+43
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds.yml
...ssing/test_cases/dag_build_fails_other_build_succeeds.yml
+62
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_always.yml
...es/dag_build_fails_other_build_succeeds_deploy_always.yml
+63
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_allow_failure.yml
...cessing/test_cases/dag_build_fails_test_allow_failure.yml
+40
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_always.yml
...ine_processing/test_cases/dag_build_fails_test_always.yml
+35
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_on_failure.yml
...processing/test_cases/dag_build_fails_test_on_failure.yml
+35
-0
spec/services/ci/pipeline_processing/test_cases/dag_build_succeeds_test_on_failure.yml
...cessing/test_cases/dag_build_succeeds_test_on_failure.yml
+35
-0
spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure.yml
...cessing/test_cases/dag_builds_succeed_test_on_failure.yml
+63
-0
spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_always.yml
...ases/dag_builds_succeed_test_on_failure_deploy_always.yml
+64
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_allow_failure_true.yml
...ine_processing/test_cases/dag_test_allow_failure_true.yml
+43
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false.yml
...essing/test_cases/dag_test_manual_allow_failure_false.yml
+66
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml
...cessing/test_cases/dag_test_manual_allow_failure_true.yml
+58
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml
...ases/dag_test_manual_allow_failure_true_deploy_always.yml
+27
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml
.../dag_test_manual_allow_failure_true_deploy_on_failure.yml
+48
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds.yml
...ag_test_manual_allow_failure_true_other_test_succeeds.yml
+42
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_failure.yml
...rocessing/test_cases/dag_test_on_failure_with_failure.yml
+66
-0
spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_success.yml
...rocessing/test_cases/dag_test_on_failure_with_success.yml
+40
-0
spec/services/ci/pipeline_processing/test_cases/stage_build_allow_failure_test_on_failure.yml
.../test_cases/stage_build_allow_failure_test_on_failure.yml
+53
-0
spec/services/ci/pipeline_processing/test_cases/stage_build_fails.yml
...s/ci/pipeline_processing/test_cases/stage_build_fails.yml
+38
-0
spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_allow_failure.yml
...ssing/test_cases/stage_build_fails_test_allow_failure.yml
+39
-0
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_false.yml
...sing/test_cases/stage_test_manual_allow_failure_false.yml
+65
-0
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true.yml
...ssing/test_cases/stage_test_manual_allow_failure_true.yml
+54
-0
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_on_failure.yml
...tage_test_manual_allow_failure_true_deploy_on_failure.yml
+44
-0
spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_failure.yml
...cessing/test_cases/stage_test_on_failure_with_failure.yml
+52
-0
spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_success.yml
...cessing/test_cases/stage_test_on_failure_with_success.yml
+52
-0
No files found.
spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
View file @
93952e6d
...
...
@@ -2,6 +2,7 @@
require
'spec_helper'
require_relative
'shared_processing_service.rb'
# require_relative 'shared_processing_service_tests_with_yaml.rb'
describe
Ci
::
PipelineProcessing
::
AtomicProcessingService
do
before
do
...
...
@@ -9,6 +10,9 @@ describe Ci::PipelineProcessing::AtomicProcessingService do
end
it_behaves_like
'Pipeline Processing Service'
# TODO: This needs to be enabled. There is a different behavior when using `needs` depending on
# a `manual` job. More info: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29405#note_327520605
# it_behaves_like 'Pipeline Processing Service Tests With Yaml'
private
...
...
spec/services/ci/pipeline_processing/legacy_processing_service_spec.rb
View file @
93952e6d
...
...
@@ -2,13 +2,16 @@
require
'spec_helper'
require_relative
'shared_processing_service.rb'
require_relative
'shared_processing_service_tests_with_yaml.rb'
describe
Ci
::
PipelineProcessing
::
LegacyProcessingService
do
before
do
stub_feature_flags
(
ci_atomic_processing:
false
)
stub_feature_flags
(
ci_composite_status:
false
)
end
it_behaves_like
'Pipeline Processing Service'
it_behaves_like
'Pipeline Processing Service Tests With Yaml'
private
...
...
spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb
0 → 100644
View file @
93952e6d
# frozen_string_literal: true
shared_context
'Pipeline Processing Service Tests With Yaml'
do
where
(
:test_file_path
)
do
Dir
.
glob
(
Rails
.
root
.
join
(
'spec/services/ci/pipeline_processing/test_cases/*.yml'
))
end
with_them
do
let
(
:test_file
)
{
YAML
.
load_file
(
test_file_path
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:pipeline
)
{
Ci
::
CreatePipelineService
.
new
(
project
,
user
,
ref:
'master'
).
execute
(
:pipeline
)
}
before
do
stub_ci_pipeline_yaml_file
(
YAML
.
dump
(
test_file
[
'config'
]))
stub_not_protect_default_branch
project
.
add_developer
(
user
)
end
it
'follows transitions'
,
:sidekiq_inline
do
expect
(
pipeline
).
to
be_persisted
check_expectation
(
test_file
.
dig
(
'init'
,
'expect'
))
test_file
[
'transitions'
].
each
do
|
transition
|
event_on_jobs
(
transition
[
'event'
],
transition
[
'jobs'
])
check_expectation
(
transition
[
'expect'
])
end
end
private
def
check_expectation
(
expectation
)
expectation
.
each
do
|
key
,
value
|
case
key
when
'pipeline'
expect
(
pipeline
.
reload
.
status
).
to
eq
(
value
)
when
'stages'
expect
(
pipeline
.
stages
.
pluck
(
:name
,
:status
).
to_h
).
to
eq
(
value
)
when
'jobs'
expect
(
pipeline
.
builds
.
latest
.
pluck
(
:name
,
:status
).
to_h
).
to
eq
(
value
)
end
end
end
def
event_on_jobs
(
event
,
job_names
)
builds
=
pipeline
.
builds
.
latest
.
where
(
name:
job_names
).
to_a
expect
(
builds
.
count
).
to
eq
(
job_names
.
count
)
# ensure that we have the same counts
builds
.
each
{
|
build
|
build
.
public_send
(
"
#{
event
}
!"
)
}
end
end
end
spec/services/ci/pipeline_processing/test_cases/dag_build_allow_failure_test_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
allow_failure
:
true
script
:
exit
1
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
needs
:
[
build
]
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
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
# TODO: What is the real expected behavior here?
# Is `needs` keyword a requirement indicator or just a helper to build dependency tree?
# How should it behave `when: on_failure` with `needs`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_fails.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
script
:
exit
0
needs
:
[
build
]
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_deploy_needs_test.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
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
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_deploy_needs_test_when_always.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
when
:
always
needs
:
[
test
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
skipped
deploy
:
pending
jobs
:
build
:
failed
test
:
skipped
deploy
:
pending
# TODO: `test` is actually skipped, but we run `deploy`. Should we?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds.yml
0 → 100644
View file @
93952e6d
config
:
build_1
:
stage
:
build
script
:
exit
0
build_2
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
needs
:
[
build_1
,
test
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build_1
:
pending
build_2
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
success
jobs
:
[
build_1
]
expect
:
pipeline
:
running
stages
:
build
:
running
test
:
created
deploy
:
created
jobs
:
build_1
:
success
build_2
:
pending
test
:
created
deploy
:
created
-
event
:
drop
jobs
:
[
build_2
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
skipped
deploy
:
pending
jobs
:
build_1
:
success
build_2
:
failed
test
:
skipped
deploy
:
pending
# TODO: should we run deploy?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_other_build_succeeds_deploy_always.yml
0 → 100644
View file @
93952e6d
config
:
build_1
:
stage
:
build
script
:
exit
0
build_2
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
when
:
always
needs
:
[
build_1
,
test
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build_1
:
pending
build_2
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
success
jobs
:
[
build_1
]
expect
:
pipeline
:
running
stages
:
build
:
running
test
:
created
deploy
:
created
jobs
:
build_1
:
success
build_2
:
pending
test
:
created
deploy
:
created
-
event
:
drop
jobs
:
[
build_2
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
skipped
deploy
:
pending
jobs
:
build_1
:
success
build_2
:
failed
test
:
skipped
deploy
:
pending
# TODO: what's the actual expected behavior here?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_allow_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
allow_failure
:
true
script
:
exit
1
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
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_always.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
when
:
always
script
:
exit
0
needs
:
[
build
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
jobs
:
build
:
pending
test
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
pending
jobs
:
build
:
failed
test
:
pending
# TODO: Should we run `test`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_fails_test_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
needs
:
[
build
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
jobs
:
build
:
pending
test
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
pending
jobs
:
build
:
failed
test
:
pending
# TODO: Should we run `test`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_build_succeeds_test_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
0
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
needs
:
[
build
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
jobs
:
build
:
pending
test
:
created
transitions
:
-
event
:
success
jobs
:
[
build
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
jobs
:
build
:
success
test
:
skipped
# TODO: Should we run `test`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
build_1
:
stage
:
build
script
:
exit
0
build_2
:
stage
:
build
script
:
exit
0
test
:
stage
:
test
script
:
exit
0
when
:
on_failure
deploy
:
stage
:
deploy
script
:
exit
0
needs
:
[
build_1
,
test
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build_1
:
pending
build_2
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
success
jobs
:
[
build_1
,
build_2
]
expect
:
pipeline
:
running
stages
:
build
:
success
test
:
skipped
deploy
:
pending
jobs
:
build_1
:
success
build_2
:
success
test
:
skipped
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
success
jobs
:
build_1
:
success
build_2
:
success
test
:
skipped
deploy
:
success
# TODO: should we run deploy?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_builds_succeed_test_on_failure_deploy_always.yml
0 → 100644
View file @
93952e6d
config
:
build_1
:
stage
:
build
script
:
exit
0
build_2
:
stage
:
build
script
:
exit
0
test
:
stage
:
test
script
:
exit
0
when
:
on_failure
deploy
:
stage
:
deploy
script
:
exit
0
when
:
always
needs
:
[
build_1
,
test
]
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build_1
:
pending
build_2
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
success
jobs
:
[
build_1
,
build_2
]
expect
:
pipeline
:
running
stages
:
build
:
success
test
:
skipped
deploy
:
pending
jobs
:
build_1
:
success
build_2
:
success
test
:
skipped
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
success
jobs
:
build_1
:
success
build_2
:
success
test
:
skipped
deploy
:
success
# TODO: should we run deploy?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_test_allow_failure_true.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
script
:
exit
0
needs
:
[
test
]
init
:
expect
:
pipeline
:
pending
stages
:
test
:
pending
deploy
:
created
jobs
:
test
:
pending
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
test
]
expect
:
pipeline
:
pending
stages
:
test
:
success
deploy
:
pending
jobs
:
test
:
failed
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
success
jobs
:
test
:
failed
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_false.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
false
script
:
exit
0
deploy
:
stage
:
deploy
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
:
manual
stages
:
test
:
manual
deploy
:
created
jobs
:
test
:
pending
deploy
:
created
-
event
:
run
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
running
deploy
:
created
jobs
:
test
:
running
deploy
:
created
-
event
:
success
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
success
deploy
:
pending
jobs
:
test
:
success
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
success
jobs
:
test
:
success
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
script
:
exit
0
needs
:
[
test
]
init
:
expect
:
pipeline
:
created
stages
:
test
:
skipped
deploy
:
created
jobs
:
test
:
manual
deploy
:
created
transitions
:
-
event
:
enqueue
jobs
:
[
test
]
expect
:
pipeline
:
pending
stages
:
test
:
running
deploy
:
created
jobs
:
test
:
pending
deploy
:
created
-
event
:
run
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
running
deploy
:
created
jobs
:
test
:
running
deploy
:
created
-
event
:
drop
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
success
deploy
:
pending
jobs
:
test
:
failed
deploy
:
pending
# TOOD: should we run deploy?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_always.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
when
:
always
script
:
exit
0
needs
:
[
test
]
init
:
expect
:
pipeline
:
created
stages
:
test
:
skipped
deploy
:
created
jobs
:
test
:
manual
deploy
:
created
transitions
:
[]
# TODO: should we run `deploy`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_deploy_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
when
:
on_failure
script
:
exit
0
needs
:
[
test
]
init
:
expect
:
pipeline
:
created
stages
:
test
:
skipped
deploy
:
created
jobs
:
test
:
manual
deploy
:
created
transitions
:
-
event
:
enqueue
jobs
:
[
test
]
expect
:
pipeline
:
pending
stages
:
test
:
running
deploy
:
created
jobs
:
test
:
pending
deploy
:
created
-
event
:
drop
jobs
:
[
test
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
skipped
jobs
:
test
:
failed
deploy
:
skipped
# TODO: should we run `deploy`?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_test_manual_allow_failure_true_other_test_succeeds.yml
0 → 100644
View file @
93952e6d
config
:
test1
:
stage
:
test
script
:
exit
0
test2
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
script
:
exit
0
needs
:
[
test1
,
test2
]
init
:
expect
:
pipeline
:
pending
stages
:
test
:
pending
deploy
:
created
jobs
:
test1
:
pending
test2
:
manual
deploy
:
created
transitions
:
-
event
:
success
jobs
:
[
test1
]
expect
:
pipeline
:
running
stages
:
test
:
success
deploy
:
created
jobs
:
test1
:
success
test2
:
manual
deploy
:
created
# TODO: should deploy run?
# Further discussions: https://gitlab.com/gitlab-org/gitlab/-/issues/213080
spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
when
:
on_failure
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
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
pending
deploy
:
created
jobs
:
build
:
failed
test
:
pending
deploy
:
created
-
event
:
success
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
success
deploy
:
pending
jobs
:
build
:
failed
test
:
success
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
success
deploy
:
success
jobs
:
build
:
failed
test
:
success
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/dag_test_on_failure_with_success.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
0
test
:
stage
:
test
when
:
on_failure
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
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
skipped
jobs
:
build
:
success
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/stage_build_allow_failure_test_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
allow_failure
:
true
script
:
exit
1
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
pending
stages
:
build
:
success
test
:
skipped
deploy
:
pending
jobs
:
build
:
failed
test
:
skipped
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
success
jobs
:
build
:
failed
test
:
skipped
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/stage_build_fails.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/stage_build_fails_test_allow_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
skipped
deploy
:
skipped
jobs
:
build
:
failed
test
:
skipped
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_false.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
false
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
manual
stages
:
test
:
manual
deploy
:
created
jobs
:
test
:
manual
deploy
:
created
transitions
:
-
event
:
enqueue
jobs
:
[
test
]
expect
:
pipeline
:
manual
stages
:
test
:
manual
deploy
:
created
jobs
:
test
:
pending
deploy
:
created
-
event
:
run
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
running
deploy
:
created
jobs
:
test
:
running
deploy
:
created
-
event
:
success
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
success
deploy
:
pending
jobs
:
test
:
success
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
success
jobs
:
test
:
success
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
test
:
skipped
deploy
:
pending
jobs
:
test
:
manual
deploy
:
pending
transitions
:
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
test
:
skipped
deploy
:
success
jobs
:
test
:
manual
deploy
:
success
-
event
:
enqueue
jobs
:
[
test
]
expect
:
pipeline
:
running
stages
:
test
:
running
deploy
:
success
jobs
:
test
:
pending
deploy
:
success
-
event
:
drop
jobs
:
[
test
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
success
jobs
:
test
:
failed
deploy
:
success
spec/services/ci/pipeline_processing/test_cases/stage_test_manual_allow_failure_true_deploy_on_failure.yml
0 → 100644
View file @
93952e6d
config
:
test
:
stage
:
test
when
:
manual
allow_failure
:
true
script
:
exit
1
deploy
:
stage
:
deploy
when
:
on_failure
script
:
exit
0
init
:
expect
:
pipeline
:
skipped
stages
:
test
:
skipped
deploy
:
skipped
jobs
:
test
:
manual
deploy
:
skipped
transitions
:
-
event
:
enqueue
jobs
:
[
test
]
expect
:
pipeline
:
pending
stages
:
test
:
running
deploy
:
skipped
jobs
:
test
:
pending
deploy
:
skipped
-
event
:
drop
jobs
:
[
test
]
expect
:
pipeline
:
success
stages
:
test
:
success
deploy
:
skipped
jobs
:
test
:
failed
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_failure.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
1
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
init
:
expect
:
pipeline
:
pending
stages
:
build
:
pending
test
:
created
deploy
:
created
jobs
:
build
:
pending
test
:
created
deploy
:
created
transitions
:
-
event
:
drop
jobs
:
[
build
]
expect
:
pipeline
:
running
stages
:
build
:
failed
test
:
pending
deploy
:
created
jobs
:
build
:
failed
test
:
pending
deploy
:
created
-
event
:
success
jobs
:
[
test
]
expect
:
pipeline
:
failed
stages
:
build
:
failed
test
:
success
deploy
:
skipped
jobs
:
build
:
failed
test
:
success
deploy
:
skipped
spec/services/ci/pipeline_processing/test_cases/stage_test_on_failure_with_success.yml
0 → 100644
View file @
93952e6d
config
:
build
:
stage
:
build
script
:
exit
0
test
:
stage
:
test
when
:
on_failure
script
:
exit
0
deploy
:
stage
:
deploy
script
:
exit
0
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
:
pending
jobs
:
build
:
success
test
:
skipped
deploy
:
pending
-
event
:
success
jobs
:
[
deploy
]
expect
:
pipeline
:
success
stages
:
build
:
success
test
:
skipped
deploy
:
success
jobs
:
build
:
success
test
:
skipped
deploy
:
success
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment