Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
dafbcf63
Commit
dafbcf63
authored
Aug 30, 2016
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-remove-unused-ci-tables' into 'master'
Drop unused CI tables and files See merge request !6014
parents
413495f0
9c2d061a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
53 deletions
+12
-53
app/services/ci/web_hook_service.rb
app/services/ci/web_hook_service.rb
+0
-35
db/migrate/20160824103857_drop_unused_ci_tables.rb
db/migrate/20160824103857_drop_unused_ci_tables.rb
+11
-0
db/schema.rb
db/schema.rb
+1
-18
No files found.
app/services/ci/web_hook_service.rb
deleted
100644 → 0
View file @
413495f0
module
Ci
class
WebHookService
def
build_end
(
build
)
execute_hooks
(
build
.
project
,
build_data
(
build
))
end
def
execute_hooks
(
project
,
data
)
project
.
web_hooks
.
each
do
|
web_hook
|
async_execute_hook
(
web_hook
,
data
)
end
end
def
async_execute_hook
(
hook
,
data
)
Sidekiq
::
Client
.
enqueue
(
Ci
::
WebHookWorker
,
hook
.
id
,
data
)
end
def
build_data
(
build
)
project
=
build
.
project
data
=
{}
data
.
merge!
({
build_id:
build
.
id
,
build_name:
build
.
name
,
build_status:
build
.
status
,
build_started_at:
build
.
started_at
,
build_finished_at:
build
.
finished_at
,
project_id:
project
.
id
,
project_name:
project
.
name
,
gitlab_url:
project
.
gitlab_url
,
ref:
build
.
ref
,
before_sha:
build
.
before_sha
,
sha:
build
.
sha
,
})
end
end
end
db/migrate/20160824103857_drop_unused_ci_tables.rb
0 → 100644
View file @
dafbcf63
class
DropUnusedCiTables
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME
=
false
def
change
drop_table
(
:ci_services
)
drop_table
(
:ci_web_hooks
)
end
end
db/schema.rb
View file @
dafbcf63
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2016082
308132
7
)
do
ActiveRecord
::
Schema
.
define
(
version:
2016082
410385
7
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -295,16 +295,6 @@ ActiveRecord::Schema.define(version: 20160823081327) do
add_index
"ci_runners"
,
[
"locked"
],
name:
"index_ci_runners_on_locked"
,
using: :btree
add_index
"ci_runners"
,
[
"token"
],
name:
"index_ci_runners_on_token"
,
using: :btree
create_table
"ci_services"
,
force: :cascade
do
|
t
|
t
.
string
"type"
t
.
string
"title"
t
.
integer
"project_id"
,
null:
false
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
boolean
"active"
,
default:
false
,
null:
false
t
.
text
"properties"
end
create_table
"ci_sessions"
,
force: :cascade
do
|
t
|
t
.
string
"session_id"
,
null:
false
t
.
text
"data"
...
...
@@ -360,13 +350,6 @@ ActiveRecord::Schema.define(version: 20160823081327) do
add_index
"ci_variables"
,
[
"gl_project_id"
],
name:
"index_ci_variables_on_gl_project_id"
,
using: :btree
create_table
"ci_web_hooks"
,
force: :cascade
do
|
t
|
t
.
string
"url"
,
null:
false
t
.
integer
"project_id"
,
null:
false
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
end
create_table
"deploy_keys_projects"
,
force: :cascade
do
|
t
|
t
.
integer
"deploy_key_id"
,
null:
false
t
.
integer
"project_id"
,
null:
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment