Ignore ProjectAutoDevops domain column
This column is no longer used. The form was removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24580 and other usages removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/28460. Remove final usages of :domain
This commit is contained in:
parent
8ab0db4e8f
commit
851321f725
3 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,10 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class ProjectAutoDevops < ApplicationRecord
|
class ProjectAutoDevops < ApplicationRecord
|
||||||
|
include IgnorableColumn
|
||||||
|
|
||||||
|
ignore_column :domain
|
||||||
|
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
enum deploy_strategy: {
|
enum deploy_strategy: {
|
||||||
|
@ -12,8 +16,6 @@ class ProjectAutoDevops < ApplicationRecord
|
||||||
scope :enabled, -> { where(enabled: true) }
|
scope :enabled, -> { where(enabled: true) }
|
||||||
scope :disabled, -> { where(enabled: false) }
|
scope :disabled, -> { where(enabled: false) }
|
||||||
|
|
||||||
validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true }
|
|
||||||
|
|
||||||
after_save :create_gitlab_deploy_token, if: :needs_to_create_deploy_token?
|
after_save :create_gitlab_deploy_token, if: :needs_to_create_deploy_token?
|
||||||
|
|
||||||
def predefined_variables
|
def predefined_variables
|
||||||
|
|
|
@ -109,7 +109,7 @@ describe Projects::Settings::CiCdController do
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when updating the auto_devops settings' do
|
context 'when updating the auto_devops settings' do
|
||||||
let(:params) { { auto_devops_attributes: { enabled: '', domain: 'mepmep.md' } } }
|
let(:params) { { auto_devops_attributes: { enabled: '' } } }
|
||||||
|
|
||||||
context 'following the instance default' do
|
context 'following the instance default' do
|
||||||
let(:params) { { auto_devops_attributes: { enabled: '' } } }
|
let(:params) { { auto_devops_attributes: { enabled: '' } } }
|
||||||
|
|
|
@ -2,7 +2,6 @@ FactoryBot.define do
|
||||||
factory :project_auto_devops do
|
factory :project_auto_devops do
|
||||||
project
|
project
|
||||||
enabled true
|
enabled true
|
||||||
domain "example.com"
|
|
||||||
deploy_strategy :continuous
|
deploy_strategy :continuous
|
||||||
|
|
||||||
trait :continuous_deployment do
|
trait :continuous_deployment do
|
||||||
|
|
Loading…
Reference in a new issue