BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fc59c45d
Commit
fc59c45d
authored
Oct 05, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the option to disable CI
This option only existed to ease the CI-to-CE/EE migration process. This commit partially reverts
8b05abe8
parent
8a78c4ea
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
9 additions
and
41 deletions
+9
-41
application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+0
-1
application_controller.rb
app/controllers/ci/application_controller.rb
+0
-9
projects_controller.rb
app/controllers/ci/projects_controller.rb
+2
-6
application_setting.rb
app/models/application_setting.rb
+1
-2
_form.html.haml
app/views/admin/application_settings/_form.html.haml
+0
-9
disabled.html.haml
app/views/ci/projects/disabled.html.haml
+0
-1
1_settings.rb
config/initializers/1_settings.rb
+0
-1
20151005162154_remove_ci_enabled_from_application_settings.rb
...1005162154_remove_ci_enabled_from_application_settings.rb
+5
-0
schema.rb
db/schema.rb
+1
-2
api.rb
lib/ci/api/api.rb
+0
-4
helpers.rb
lib/ci/api/helpers.rb
+0
-6
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
fc59c45d
...
...
@@ -56,7 +56,6 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:restricted_signup_domains_raw
,
:version_check_enabled
,
:user_oauth_applications
,
:ci_enabled
,
restricted_visibility_levels:
[],
import_sources:
[]
)
...
...
app/controllers/ci/application_controller.rb
View file @
fc59c45d
module
Ci
class
ApplicationController
<
::
ApplicationController
before_action
:check_enable_flag!
def
self
.
railtie_helpers_paths
"app/helpers/ci"
end
...
...
@@ -10,13 +8,6 @@ module Ci
private
def
check_enable_flag!
unless
current_application_settings
.
ci_enabled
redirect_to
(
disabled_ci_projects_path
)
return
end
end
def
authenticate_public_page!
unless
project
.
public
authenticate_user!
...
...
app/controllers/ci/projects_controller.rb
View file @
fc59c45d
...
...
@@ -3,17 +3,13 @@ module Ci
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
,
:show
]
before_action
:authenticate_public_page!
,
only: :show
before_action
:project
,
only:
[
:build
,
:show
,
:badge
,
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authorize_access_project!
,
except:
[
:build
,
:badge
,
:show
,
:new
,
:disabled
]
before_action
:authorize_access_project!
,
except:
[
:build
,
:badge
,
:show
,
:new
]
before_action
:authorize_manage_project!
,
only:
[
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authenticate_token!
,
only:
[
:build
]
before_action
:no_cache
,
only:
[
:badge
]
skip_before_action
:check_enable_flag!
,
only:
[
:disabled
]
protect_from_forgery
except: :build
layout
'ci/project'
,
except:
[
:index
,
:disabled
]
def
disabled
end
layout
'ci/project'
,
except:
[
:index
]
def
show
@ref
=
params
[
:ref
]
...
...
app/models/application_setting.rb
View file @
fc59c45d
...
...
@@ -83,8 +83,7 @@ class ApplicationSetting < ActiveRecord::Base
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_snippet_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
restricted_signup_domains:
Settings
.
gitlab
[
'restricted_signup_domains'
],
import_sources:
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
],
ci_enabled:
Settings
.
gitlab_ci
[
'enabled'
]
import_sources:
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
]
)
end
...
...
app/views/admin/application_settings/_form.html.haml
View file @
fc59c45d
...
...
@@ -124,14 +124,5 @@
=
f
.
text_area
:help_page_text
,
class:
'form-control'
,
rows:
4
.help-block
Markdown enabled
%fieldset
%legend
Continuous Integration
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
=
f
.
label
:ci_enabled
do
=
f
.
check_box
:ci_enabled
Disable to prevent CI usage until rake ci:migrate is run (8.0 only)
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-primary'
app/views/ci/projects/disabled.html.haml
deleted
100644 → 0
View file @
8a78c4ea
Continuous Integration has been disabled for time of the migration.
config/initializers/1_settings.rb
View file @
fc59c45d
...
...
@@ -178,7 +178,6 @@ Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious'
# CI
#
Settings
[
'gitlab_ci'
]
||=
Settingslogic
.
new
({})
Settings
.
gitlab_ci
[
'enabled'
]
=
true
if
Settings
.
gitlab_ci
[
'enabled'
].
nil?
Settings
.
gitlab_ci
[
'all_broken_builds'
]
=
true
if
Settings
.
gitlab_ci
[
'all_broken_builds'
].
nil?
Settings
.
gitlab_ci
[
'add_pusher'
]
=
false
if
Settings
.
gitlab_ci
[
'add_pusher'
].
nil?
Settings
.
gitlab_ci
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_ci_url
)
...
...
db/migrate/20151005162154_remove_ci_enabled_from_application_settings.rb
0 → 100644
View file @
fc59c45d
class
RemoveCiEnabledFromApplicationSettings
<
ActiveRecord
::
Migration
def
change
remove_column
:application_settings
,
:ci_enabled
,
:boolean
,
null:
false
,
default:
true
end
end
db/schema.rb
View file @
fc59c45d
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2015
0930095736
)
do
ActiveRecord
::
Schema
.
define
(
version:
2015
1005162154
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -46,7 +46,6 @@ ActiveRecord::Schema.define(version: 20150930095736) do
t
.
integer
"session_expire_delay"
,
default:
10080
,
null:
false
t
.
text
"import_sources"
t
.
text
"help_page_text"
t
.
boolean
"ci_enabled"
,
default:
true
,
null:
false
end
create_table
"audit_events"
,
force:
true
do
|
t
|
...
...
lib/ci/api/api.rb
View file @
fc59c45d
...
...
@@ -23,10 +23,6 @@ module Ci
rack_response
({
'message'
=>
'500 Internal Server Error'
},
500
)
end
before
do
check_enable_flag!
end
format
:json
helpers
Helpers
...
...
lib/ci/api/helpers.rb
View file @
fc59c45d
...
...
@@ -3,12 +3,6 @@ module Ci
module
Helpers
UPDATE_RUNNER_EVERY
=
60
def
check_enable_flag!
unless
current_application_settings
.
ci_enabled
render_api_error!
(
'400 (Bad request) CI is disabled'
,
400
)
end
end
def
authenticate_runners!
forbidden!
unless
params
[
:token
]
==
GitlabCi
::
REGISTRATION_TOKEN
end
...
...
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