Sha256: 792fc97afd6996984aa0955cb5b072fdd75924385d87051fec85878d56f48452

Contents?: true

Size: 1.24 KB

Versions: 83

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

module Gitlab
  module QA
    module Runtime
      module OmnibusConfigurations
        class ObjectStorage < Default
          TYPES = %w[artifacts external_diffs lfs uploads packages dependency_proxy terraform_state pages].freeze

          def configuration
            config = TYPES.each_with_object(+'') do |object_type, omnibus|
              omnibus << <<~OMNIBUS
                gitlab_rails['object_store']['objects']['#{object_type}']['bucket'] = '#{object_type}-bucket'
              OMNIBUS
            end
            config << <<~OMNIBUS
              gitlab_rails['object_store']['enabled'] = true
              gitlab_rails['object_store']['proxy_download'] = true
              gitlab_rails['object_store']['connection'] = #{minio.to_config}
            OMNIBUS
          end

          def prepare
            minio.network = 'test'

            TYPES.each do |bucket_name|
              minio.add_bucket("#{bucket_name}-bucket")
            end

            minio
          end

          def exec_commands
            QA::Scenario::CLICommands.git_lfs_install_commands
          end

          private

          def minio
            @minio ||= Component::Minio.new
          end
        end
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
gitlab-qa-14.9.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.8.1 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.8.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.7.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.6.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.5.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.4.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.3.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.2.1 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.2.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.1.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.0.2 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.0.1 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-14.0.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-13.2.1 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-13.2.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-13.1.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-13.0.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-12.5.1 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb
gitlab-qa-12.5.0 lib/gitlab/qa/runtime/omnibus_configurations/object_storage.rb