Commit 14b49657 authored by Shinya Maeda's avatar Shinya Maeda

Merge branch '199250-expose-release-yaml-as-steps-via-api' into 'master'

Rename `release_steps` to `multi_build_steps`

Closes #199250

See merge request gitlab-org/gitlab!34716
parents 15efe30e 8b1e5790
......@@ -27,7 +27,7 @@ module Ci
upload_multiple_artifacts: -> (build) { build.publishes_artifacts_reports? },
refspecs: -> (build) { build.merge_request_ref? },
artifacts_exclude: -> (build) { build.supports_artifacts_exclude? },
release_steps: -> (build) { build.release_steps? }
multi_build_steps: -> (build) { build.multi_build_steps? }
}.freeze
DEFAULT_RETRIES = {
......@@ -890,7 +890,7 @@ module Ci
Gitlab::Ci::Features.artifacts_exclude_enabled?
end
def release_steps?
def multi_build_steps?
options.dig(:release)&.any? &&
Gitlab::Ci::Features.release_generation_enabled?
end
......
......@@ -4302,15 +4302,15 @@ describe Ci::Build do
end
end
context 'when `release_steps` feature is required by build' do
context 'when `multi_build_steps` feature is required by build' do
before do
expect(build).to receive(:runner_required_feature_names) do
[:release_steps]
[:multi_build_steps]
end
end
context 'when runner provides given feature' do
let(:runner_features) { { release_steps: true } }
let(:runner_features) { { multi_build_steps: true } }
it { is_expected.to be_truthy }
end
......
......@@ -651,9 +651,9 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
context 'when job is for a release' do
let!(:job) { create(:ci_build, :release_options, pipeline: pipeline) }
context 'when `release_steps` is passed by the runner' do
context 'when `multi_build_steps` is passed by the runner' do
it 'exposes release info' do
request_job info: { features: { release_steps: true } }
request_job info: { features: { multi_build_steps: true } }
expect(response).to have_gitlab_http_status(:created)
expect(response.headers).not_to have_key('X-GitLab-Last-Update')
......@@ -677,7 +677,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
end
end
context 'when `release_steps` is not passed by the runner' do
context 'when `multi_build_steps` is not passed by the runner' do
it 'drops the job' do
request_job
......
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