Commit ee0b090b authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch...

Merge branch '296136-stop-deploying-to-pages-legacy-storage-if-feature-flag-is-enabled' into 'master'

Stop deploying to Pages legacy storage if feature flag is disabled

See merge request gitlab-org/gitlab!50683
parents 57a1150a da472a03
......@@ -80,6 +80,10 @@ module Projects
end
def deploy_to_legacy_storage(artifacts_path)
# path today used by one project can later be used by another
# so we can't really scope this feature flag by project or group
return unless Feature.enabled?(:pages_update_legacy_storage, default_enabled: true)
# Create temporary directory in which we will extract the artifacts
make_secure_tmp_dir(tmp_path) do |tmp_path|
extract_archive!(artifacts_path, tmp_path)
......
---
name: pages_update_legacy_storage
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50683
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/296138
milestone: '13.9'
type: development
group: group::release
default_enabled: true
......@@ -55,6 +55,15 @@ RSpec.describe Projects::UpdatePagesService do
end
end
it "doesn't deploy to legacy storage if it's disabled" do
stub_feature_flags(pages_update_legacy_storage: false)
expect(execute).to eq(:success)
expect(project.pages_deployed?).to be_truthy
expect(File.exist?(File.join(project.pages_path, 'public', 'index.html'))).to eq(false)
end
it 'creates pages_deployment and saves it in the metadata' do
expect do
expect(execute).to eq(:success)
......
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