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
This commit is contained in:
commit
9209736a22
6 changed files with 21 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Removes project_auto_devops#domain column
|
||||
merge_request: 28574
|
||||
author:
|
||||
type: other
|
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class DropProjectAutoDevopsDomain < ActiveRecord::Migration[5.1]
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
DOWNTIME = false
|
||||
|
||||
def change
|
||||
remove_column :project_auto_devops, :domain, :string
|
||||
end
|
||||
end
|
|
@ -1633,7 +1633,6 @@ ActiveRecord::Schema.define(version: 20190527194900) do
|
|||
t.datetime_with_timezone "created_at", null: false
|
||||
t.datetime_with_timezone "updated_at", null: false
|
||||
t.boolean "enabled"
|
||||
t.string "domain"
|
||||
t.integer "deploy_strategy", default: 0, null: false
|
||||
t.index ["project_id"], name: "index_project_auto_devops_on_project_id", unique: true, using: :btree
|
||||
end
|
||||
|
|
|
@ -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: '' } } }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue