Commit f87bbb46 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'ci-secrets-feature-check' into 'master'

"ci_secrets_management" feature check

See merge request gitlab-org/gitlab!34587
parents 8e35608e aa9f365a
...@@ -134,6 +134,10 @@ module EE ...@@ -134,6 +134,10 @@ module EE
!merge_train_pipeline? && super !merge_train_pipeline? && super
end end
def ci_secrets_management_available?
project.beta_feature_available?(:ci_secrets_management)
end
private private
def parse_security_artifact_blob(security_report, blob) def parse_security_artifact_blob(security_report, blob)
......
...@@ -52,6 +52,7 @@ class License < ApplicationRecord ...@@ -52,6 +52,7 @@ class License < ApplicationRecord
board_assignee_lists board_assignee_lists
board_milestone_lists board_milestone_lists
ci_cd_projects ci_cd_projects
ci_secrets_management
cluster_deployments cluster_deployments
code_owner_approval_required code_owner_approval_required
commit_committer_check commit_committer_check
......
...@@ -486,4 +486,24 @@ RSpec.describe Ci::Build do ...@@ -486,4 +486,24 @@ RSpec.describe Ci::Build do
expect(described_class.license_scan).to contain_exactly(build_with_license_scan) expect(described_class.license_scan).to contain_exactly(build_with_license_scan)
end end
end end
describe 'ci_secrets_management_available?' do
subject(:build) { job.ci_secrets_management_available? }
context 'when secrets management feature is available' do
before do
stub_licensed_features(ci_secrets_management: true)
end
it { is_expected.to be true }
end
context 'when secrets management feature is not available' do
before do
stub_licensed_features(ci_secrets_management: false)
end
it { is_expected.to be false }
end
end
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