Commit 8fc82cbd authored by Matija Čupić's avatar Matija Čupić

Rename failure reason to be more descriptive

parent 9d810e3d
......@@ -16,7 +16,7 @@ module EE
upstream_bridge_project_not_found: 1_004,
insufficient_upstream_permissions: 1_005,
bridge_pipeline_is_child_pipeline: 1_006,
downstream_bridge_pipeline_creation_failed: 1_007)
downstream_pipeline_creation_failed: 1_007)
end
end
end
......
......@@ -12,7 +12,7 @@ module EE
upstream_bridge_project_not_found: 'This job could not be executed because upstream bridge project could not be found.',
invalid_bridge_trigger: 'This job could not be executed because downstream pipeline trigger definition is invalid.',
bridge_pipeline_is_child_pipeline: 'This job belongs to a child pipeline and cannot create further child pipelines.',
downstream_bridge_pipeline_creation_failed: 'The downstream project pipeline could not be created.'
downstream_pipeline_creation_failed: 'The downstream pipeline could not be created.'
).freeze
EE::CommitStatusPresenter.private_constant :EE_CALLOUT_FAILURE_MESSAGES
......
......@@ -30,7 +30,7 @@ module Ci
end
downstream_pipeline.tap do |pipeline|
@bridge.drop!(:downstream_bridge_pipeline_creation_failed) if pipeline.has_yaml_errors?
@bridge.drop!(:downstream_pipeline_creation_failed) if pipeline.has_yaml_errors?
end
end
......
......@@ -17,7 +17,7 @@ module EE
insufficient_bridge_permissions: 'no permissions to trigger downstream pipeline',
insufficient_upstream_permissions: 'no permissions to read upstream project',
bridge_pipeline_is_child_pipeline: 'creation of child pipeline not allowed from another child pipeline',
downstream_bridge_pipeline_creation_failed: 'downstream bridge pipeline can not be created'
downstream_pipeline_creation_failed: 'downstream pipeline can not be created'
).freeze
EE::Gitlab::Ci::Status::Build::Failed.private_constant :EE_REASONS
end
......
......@@ -265,6 +265,7 @@ describe Ci::CreateCrossProjectPipelineService, '#execute' do
expect(pipeline.reload).to be_failed
expect(bridge.reload).to be_failed
expect(bridge.failure_reason).to eq('downstream_pipeline_creation_failed')
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment