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
8dadd2ea
Commit
8dadd2ea
authored
Feb 16, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
cf1d4237
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2 additions
and
73 deletions
+2
-73
app/models/ci/pipeline.rb
app/models/ci/pipeline.rb
+1
-1
app/services/ci/create_cross_project_pipeline_service.rb
app/services/ci/create_cross_project_pipeline_service.rb
+1
-5
changelogs/unreleased/drop-bridge-on-any-pipeline-errors.yml
changelogs/unreleased/drop-bridge-on-any-pipeline-errors.yml
+0
-5
changelogs/unreleased/fix-upstream-bridge-stuck-when-non-pending-pipelines.yml
.../fix-upstream-bridge-stuck-when-non-pending-pipelines.yml
+0
-5
changelogs/unreleased/mc-bug-fail-upstream-on-invalid-yaml.yml
...elogs/unreleased/mc-bug-fail-upstream-on-invalid-yaml.yml
+0
-5
spec/models/ci/pipeline_spec.rb
spec/models/ci/pipeline_spec.rb
+0
-24
spec/services/ci/create_cross_project_pipeline_service_spec.rb
...services/ci/create_cross_project_pipeline_service_spec.rb
+0
-28
No files found.
app/models/ci/pipeline.rb
View file @
8dadd2ea
...
...
@@ -214,7 +214,7 @@ module Ci
end
end
after_transition
created:
any
-
[
:failed
]
do
|
pipeline
|
after_transition
created:
:pending
do
|
pipeline
|
next
unless
pipeline
.
bridge_triggered?
next
if
pipeline
.
bridge_waiting?
...
...
app/services/ci/create_cross_project_pipeline_service.rb
View file @
8dadd2ea
...
...
@@ -18,7 +18,7 @@ module Ci
current_user
,
pipeline_params
.
fetch
(
:target_revision
))
downstream_pipeline
=
service
.
execute
(
service
.
execute
(
pipeline_params
.
fetch
(
:source
),
pipeline_params
[
:execute_params
])
do
|
pipeline
|
@bridge
.
sourced_pipelines
.
build
(
source_pipeline:
@bridge
.
pipeline
,
...
...
@@ -28,10 +28,6 @@ module Ci
pipeline
.
variables
.
build
(
@bridge
.
downstream_variables
)
end
downstream_pipeline
.
tap
do
|
pipeline
|
@bridge
.
drop!
(
:downstream_pipeline_creation_failed
)
if
pipeline
.
errors
.
any?
end
end
private
...
...
changelogs/unreleased/drop-bridge-on-any-pipeline-errors.yml
deleted
100644 → 0
View file @
cf1d4237
---
title
:
Drop bridge on any downstream pipeline errors
merge_request
:
24735
author
:
type
:
fixed
changelogs/unreleased/fix-upstream-bridge-stuck-when-non-pending-pipelines.yml
deleted
100644 → 0
View file @
cf1d4237
---
title
:
Fix upstream bridge stuck when downstream pipeline is not pending
merge_request
:
24665
author
:
type
:
fixed
changelogs/unreleased/mc-bug-fail-upstream-on-invalid-yaml.yml
deleted
100644 → 0
View file @
cf1d4237
---
title
:
Fail upstream bridge on downstream pipeline creation failure.
merge_request
:
24092
author
:
type
:
fixed
spec/models/ci/pipeline_spec.rb
View file @
8dadd2ea
...
...
@@ -2932,30 +2932,6 @@ describe Ci::Pipeline, :mailer do
create
(
:ci_sources_pipeline
,
pipeline:
pipeline
,
source_job:
bridge
)
end
context
'when downstream pipeline status transitions to pending'
do
it
'updates bridge status '
do
expect
(
pipeline
).
to
receive
(
:update_bridge_status!
).
once
pipeline
.
run!
end
end
context
'when the status of downstream pipeline transitions to waiting_for_resource'
do
it
'updates bridge status '
do
expect
(
pipeline
).
to
receive
(
:update_bridge_status!
).
once
pipeline
.
request_resource!
end
end
context
'when the status of downstream pipeline transitions to failed'
do
it
'does not update bridge status '
do
expect
(
pipeline
).
not_to
receive
(
:update_bridge_status!
)
pipeline
.
drop!
end
end
describe
'#bridge_triggered?'
do
it
'is a pipeline triggered by a bridge'
do
expect
(
pipeline
).
to
be_bridge_triggered
...
...
spec/services/ci/create_cross_project_pipeline_service_spec.rb
View file @
8dadd2ea
...
...
@@ -267,34 +267,6 @@ describe Ci::CreateCrossProjectPipelineService, '#execute' do
end
end
context
'when downstream pipeline creation errors out'
do
let
(
:stub_config
)
{
false
}
before
do
stub_ci_pipeline_yaml_file
(
YAML
.
dump
(
invalid:
{
yaml:
'error'
}))
end
it
'creates only one new pipeline'
do
expect
{
service
.
execute
(
bridge
)
}
.
to
change
{
Ci
::
Pipeline
.
count
}.
by
(
1
)
end
it
'creates a new pipeline in the downstream project'
do
pipeline
=
service
.
execute
(
bridge
)
expect
(
pipeline
.
user
).
to
eq
bridge
.
user
expect
(
pipeline
.
project
).
to
eq
downstream_project
end
it
'drops the bridge'
do
pipeline
=
service
.
execute
(
bridge
)
expect
(
pipeline
.
reload
).
to
be_failed
expect
(
bridge
.
reload
).
to
be_failed
expect
(
bridge
.
failure_reason
).
to
eq
(
'downstream_pipeline_creation_failed'
)
end
end
context
'when bridge job has YAML variables defined'
do
before
do
bridge
.
yaml_variables
=
[{
key:
'BRIDGE'
,
value:
'var'
,
public:
true
}]
...
...
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