diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-12 07:29:43 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-12 07:29:43 +0000 |
commit | 0e09cb28051de0623a8fed610f18540246fabd77 (patch) | |
tree | 8affa46fe5c7ecebc7e4f997b85fa0b677c091cb | |
parent | 5155b9794db107bdb44297a7c01ced13581ee303 (diff) | |
parent | bb5f3e789725b20542d6336e14817c7213e2f744 (diff) | |
download | gitlab-ce-0e09cb28051de0623a8fed610f18540246fabd77.tar.gz |
Merge branch 'rs-issue-2214' into 'master'
Rename all uses of Buildbox to Buildkite
Closes #2214
See merge request !1759
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | app/models/project_services/buildkite_service.rb (renamed from app/models/project_services/buildbox_service.rb) | 4 | ||||
-rw-r--r-- | app/models/service.rb | 28 | ||||
-rw-r--r-- | db/migrate/20150411180045_rename_buildbox_service.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 2 | ||||
-rw-r--r-- | spec/models/project_services/buildkite_service_spec.rb (renamed from spec/models/project_services/buildbox_service_spec.rb) | 4 |
7 files changed, 29 insertions, 21 deletions
diff --git a/CHANGELOG b/CHANGELOG index 38a4117eb80..8341857e4e3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -67,6 +67,7 @@ v 7.10.0 (unreleased) - Fix and improve help rendering (Sullivan Sénéchal) - Fix final line in EmailsOnPush email diff being rendered as error. - Authometic setup GitLab CI project for forks if origin project has GitLab CI enabled + - Prevent duplicate Buildkite service creation. v 7.9.3 - Contains no changes diff --git a/app/models/project.rb b/app/models/project.rb index 79572f255db..5c310b4a8df 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -81,7 +81,7 @@ class Project < ActiveRecord::Base has_one :asana_service, dependent: :destroy has_one :gemnasium_service, dependent: :destroy has_one :slack_service, dependent: :destroy - has_one :buildbox_service, dependent: :destroy + has_one :buildkite_service, dependent: :destroy has_one :bamboo_service, dependent: :destroy has_one :teamcity_service, dependent: :destroy has_one :pushover_service, dependent: :destroy diff --git a/app/models/project_services/buildbox_service.rb b/app/models/project_services/buildkite_service.rb index 3a381ff11b8..a714bc82246 100644 --- a/app/models/project_services/buildbox_service.rb +++ b/app/models/project_services/buildkite_service.rb @@ -20,9 +20,7 @@ require "addressable/uri" -# Buildbox renamed to Buildkite, but for backwards compatability with the STI -# of Services, the class name is kept as "Buildbox" -class BuildboxService < CiService +class BuildkiteService < CiService ENDPOINT = "https://buildkite.com" prop_accessor :project_url, :token diff --git a/app/models/service.rb b/app/models/service.rb index f54ad19666b..393cf55a69f 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -122,25 +122,25 @@ class Service < ActiveRecord::Base def self.available_services_names %w( - gitlab_ci - campfire - hipchat - pivotaltracker - flowdock - assembla asana + assembla + bamboo + buildkite + campfire + custom_issue_tracker emails_on_push + external_wiki + flowdock gemnasium - slack - pushover - buildbox - bamboo - teamcity + gitlab_ci + hipchat + irker jira + pivotaltracker + pushover redmine - custom_issue_tracker - irker - external_wiki + slack + teamcity ) end diff --git a/db/migrate/20150411180045_rename_buildbox_service.rb b/db/migrate/20150411180045_rename_buildbox_service.rb new file mode 100644 index 00000000000..5a0b5d07e50 --- /dev/null +++ b/db/migrate/20150411180045_rename_buildbox_service.rb @@ -0,0 +1,9 @@ +class RenameBuildboxService < ActiveRecord::Migration + def up + execute "UPDATE services SET type = 'BuildkiteService' WHERE type = 'BuildboxService';" + end + + def down + execute "UPDATE services SET type = 'BuildboxService' WHERE type = 'BuildkiteService';" + end +end diff --git a/db/schema.rb b/db/schema.rb index 14e32a7946e..3f481b67fd2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150328132231) do +ActiveRecord::Schema.define(version: 20150411180045) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/spec/models/project_services/buildbox_service_spec.rb b/spec/models/project_services/buildkite_service_spec.rb index 9f29fbe12b0..e987241f3ca 100644 --- a/spec/models/project_services/buildbox_service_spec.rb +++ b/spec/models/project_services/buildkite_service_spec.rb @@ -19,7 +19,7 @@ require 'spec_helper' -describe BuildboxService do +describe BuildkiteService do describe 'Associations' do it { is_expected.to belong_to :project } it { is_expected.to have_one :service_hook } @@ -32,7 +32,7 @@ describe BuildboxService do default_branch: 'default-brancho' ) - @service = BuildboxService.new + @service = BuildkiteService.new @service.stub( project: @project, service_hook: true, |