From 851321f725062e34248f3d3053cdb92d89d2a1f3 Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Wed, 22 May 2019 14:32:15 +1200 Subject: [PATCH] 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 --- app/models/project_auto_devops.rb | 6 ++++-- spec/controllers/projects/settings/ci_cd_controller_spec.rb | 2 +- spec/factories/project_auto_devops.rb | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/project_auto_devops.rb b/app/models/project_auto_devops.rb index 90bcb3067f6..67c12363a3c 100644 --- a/app/models/project_auto_devops.rb +++ b/app/models/project_auto_devops.rb @@ -1,6 +1,10 @@ # frozen_string_literal: true class ProjectAutoDevops < ApplicationRecord + include IgnorableColumn + + ignore_column :domain + belongs_to :project enum deploy_strategy: { @@ -12,8 +16,6 @@ class ProjectAutoDevops < ApplicationRecord scope :enabled, -> { where(enabled: true) } 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? def predefined_variables diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb index db53e5bc8a4..b91a4df40a5 100644 --- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb +++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb @@ -109,7 +109,7 @@ describe Projects::Settings::CiCdController do end 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 let(:params) { { auto_devops_attributes: { enabled: '' } } } diff --git a/spec/factories/project_auto_devops.rb b/spec/factories/project_auto_devops.rb index 75ac7cc7687..1de42512402 100644 --- a/spec/factories/project_auto_devops.rb +++ b/spec/factories/project_auto_devops.rb @@ -2,7 +2,6 @@ FactoryBot.define do factory :project_auto_devops do project enabled true - domain "example.com" deploy_strategy :continuous trait :continuous_deployment do