Skip to content

Commit 9209736

Browse files
committed
Merge branch '56959-drop-project_auto_devops_domain' into 'master'
Removes project_auto_devops#domain column Closes #56959 See merge request gitlab-org/gitlab-ce!28574
2 parents b9798c1 + bfed231 commit 9209736

File tree

6 files changed

+21
-5
lines changed

6 files changed

+21
-5
lines changed

app/models/project_auto_devops.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# frozen_string_literal: true
22

33
class ProjectAutoDevops < ApplicationRecord
4+
include IgnorableColumn
5+
6+
ignore_column :domain
7+
48
belongs_to :project
59

610
enum deploy_strategy: {
@@ -12,8 +16,6 @@ class ProjectAutoDevops < ApplicationRecord
1216
scope :enabled, -> { where(enabled: true) }
1317
scope :disabled, -> { where(enabled: false) }
1418

15-
validates :domain, allow_blank: true, hostname: { allow_numeric_hostname: true }
16-
1719
after_save :create_gitlab_deploy_token, if: :needs_to_create_deploy_token?
1820

1921
def predefined_variables
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Removes project_auto_devops#domain column
3+
merge_request: 28574
4+
author:
5+
type: other
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
class DropProjectAutoDevopsDomain < ActiveRecord::Migration[5.1]
4+
include Gitlab::Database::MigrationHelpers
5+
6+
DOWNTIME = false
7+
8+
def change
9+
remove_column :project_auto_devops, :domain, :string
10+
end
11+
end

db/schema.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,6 @@
16331633
t.datetime_with_timezone "created_at", null: false
16341634
t.datetime_with_timezone "updated_at", null: false
16351635
t.boolean "enabled"
1636-
t.string "domain"
16371636
t.integer "deploy_strategy", default: 0, null: false
16381637
t.index ["project_id"], name: "index_project_auto_devops_on_project_id", unique: true, using: :btree
16391638
end

spec/controllers/projects/settings/ci_cd_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
end
110110

111111
context 'when updating the auto_devops settings' do
112-
let(:params) { { auto_devops_attributes: { enabled: '', domain: 'mepmep.md' } } }
112+
let(:params) { { auto_devops_attributes: { enabled: '' } } }
113113

114114
context 'following the instance default' do
115115
let(:params) { { auto_devops_attributes: { enabled: '' } } }

spec/factories/project_auto_devops.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
factory :project_auto_devops do
33
project
44
enabled true
5-
domain "example.com"
65
deploy_strategy :continuous
76

87
trait :continuous_deployment do

0 commit comments

Comments
 (0)