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
Kazuhiko Shiozaki
gitlab-ce
Commits
381180bc
Commit
381180bc
authored
Sep 10, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove gitlab_ci config
parent
44261a5d
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
36 additions
and
168 deletions
+36
-168
app/helpers/ci/routes_helper.rb
app/helpers/ci/routes_helper.rb
+3
-3
app/helpers/ci/triggers_helper.rb
app/helpers/ci/triggers_helper.rb
+1
-1
app/mailers/ci/notify.rb
app/mailers/ci/notify.rb
+4
-4
app/models/ci/application_setting.rb
app/models/ci/application_setting.rb
+2
-2
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/ci/project.rb
app/models/ci/project.rb
+1
-1
app/views/ci/projects/gitlab.html.haml
app/views/ci/projects/gitlab.html.haml
+0
-1
app/views/ci/projects/index.html.haml
app/views/ci/projects/index.html.haml
+0
-5
config/gitlab_ci.yml.example
config/gitlab_ci.yml.example
+0
-68
config/gitlab_ci.yml.example.development
config/gitlab_ci.yml.example.development
+0
-19
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+23
-1
config/initializers/3_ci_settings.rb
config/initializers/3_ci_settings.rb
+0
-61
config/initializers/4_ci_app.rb
config/initializers/4_ci_app.rb
+1
-1
No files found.
app/helpers/ci/routes_helper.rb
View file @
381180bc
...
@@ -5,9 +5,9 @@ module Ci
...
@@ -5,9 +5,9 @@ module Ci
def
default_url_options
def
default_url_options
{
{
host:
Ci
::
Settings
.
gitlab_ci
[
'host'
],
host:
Settings
.
gitlab
[
'host'
],
protocol:
Ci
::
Settings
.
gitlab_ci
[
'https'
]
?
"https"
:
"http"
,
protocol:
Settings
.
gitlab
[
'https'
]
?
"https"
:
"http"
,
port:
Ci
::
Settings
.
gitlab_ci
[
'port'
]
port:
Settings
.
gitlab
[
'port'
]
}
}
end
end
end
end
...
...
app/helpers/ci/triggers_helper.rb
View file @
381180bc
module
Ci
module
Ci
module
TriggersHelper
module
TriggersHelper
def
build_trigger_url
(
project_id
,
ref_name
)
def
build_trigger_url
(
project_id
,
ref_name
)
"
#{
Ci
::
Settings
.
gitlab_ci
.
url
}
/api/v1/projects/
#{
project_id
}
/refs/
#{
ref_name
}
/trigger"
"
#{
Settings
.
gitlab_ci
.
url
}
/ci
/api/v1/projects/
#{
project_id
}
/refs/
#{
ref_name
}
/trigger"
end
end
end
end
end
end
app/mailers/ci/notify.rb
View file @
381180bc
...
@@ -5,10 +5,10 @@ module Ci
...
@@ -5,10 +5,10 @@ module Ci
add_template_helper
Ci
::
ApplicationHelper
add_template_helper
Ci
::
ApplicationHelper
add_template_helper
Ci
::
GitlabHelper
add_template_helper
Ci
::
GitlabHelper
default_url_options
[
:host
]
=
Gitlab
Ci
.
config
.
gitlab_ci
.
host
default_url_options
[
:host
]
=
Gitlab
.
config
.
gitlab
.
host
default_url_options
[
:protocol
]
=
Gitlab
Ci
.
config
.
gitlab_ci
.
protocol
default_url_options
[
:protocol
]
=
Gitlab
.
config
.
gitlab
.
protocol
default_url_options
[
:port
]
=
Gitlab
Ci
.
config
.
gitlab_ci
.
port
if
GitlabCi
.
config
.
gitlab_ci_on_n
on_standard_port?
default_url_options
[
:port
]
=
Gitlab
.
config
.
gitlab
.
port
unless
Gitlab
.
config
.
gitlab_
on_standard_port?
default_url_options
[
:script_name
]
=
Gitlab
Ci
.
config
.
gitlab_ci
.
relative_url_root
default_url_options
[
:script_name
]
=
Gitlab
.
config
.
gitlab
.
relative_url_root
default
from:
GitlabCi
.
config
.
gitlab_ci
.
email_from
default
from:
GitlabCi
.
config
.
gitlab_ci
.
email_from
...
...
app/models/ci/application_setting.rb
View file @
381180bc
...
@@ -19,8 +19,8 @@ module Ci
...
@@ -19,8 +19,8 @@ module Ci
def
self
.
create_from_defaults
def
self
.
create_from_defaults
create
(
create
(
all_broken_builds:
Ci
::
Settings
.
gitlab_ci
[
'all_broken_builds'
],
all_broken_builds:
Settings
.
gitlab_ci
[
'all_broken_builds'
],
add_pusher:
Ci
::
Settings
.
gitlab_ci
[
'add_pusher'
],
add_pusher:
Settings
.
gitlab_ci
[
'add_pusher'
],
)
)
end
end
end
end
...
...
app/models/ci/build.rb
View file @
381180bc
...
@@ -244,7 +244,7 @@ module Ci
...
@@ -244,7 +244,7 @@ module Ci
def
dir_to_trace
def
dir_to_trace
File
.
join
(
File
.
join
(
Ci
::
Settings
.
gitlab_ci
.
builds_path
,
Settings
.
gitlab_ci
.
builds_path
,
created_at
.
utc
.
strftime
(
"%Y_%m"
),
created_at
.
utc
.
strftime
(
"%Y_%m"
),
project
.
id
.
to_s
project
.
id
.
to_s
)
)
...
...
app/models/ci/project.rb
View file @
381180bc
...
@@ -211,7 +211,7 @@ module Ci
...
@@ -211,7 +211,7 @@ module Ci
end
end
def
gitlab_url
def
gitlab_url
File
.
join
(
Gitlab
Ci
.
config
.
gitlab_server
.
url
,
path
)
File
.
join
(
Gitlab
.
config
.
gitlab
.
url
,
path
)
end
end
def
setup_finished?
def
setup_finished?
...
...
app/views/ci/projects/gitlab.html.haml
View file @
381180bc
-
if
@offset
==
0
-
if
@offset
==
0
.clearfix.light
.clearfix.light
.pull-left.fetch-status
.pull-left.fetch-status
Fetched from GitLab (
#{
link_to
GitlabCi
.
config
.
gitlab_server
.
url
,
GitlabCi
.
config
.
gitlab_server
.
url
,
no_turbolink
}
)
-
if
params
[
:search
].
present?
-
if
params
[
:search
].
present?
by keyword: "
#{
params
[
:search
]
}
",
by keyword: "
#{
params
[
:search
]
}
",
%br
%br
...
...
app/views/ci/projects/index.html.haml
View file @
381180bc
...
@@ -8,14 +8,9 @@
...
@@ -8,14 +8,9 @@
.projects
.projects
%p
.fetch-status.light
%p
.fetch-status.light
%i
.fa.fa-refresh.fa-spin
%i
.fa.fa-refresh.fa-spin
Please wait while we fetch from GitLab (
#{
GitlabCi
.
config
.
gitlab_server
.
url
}
)
:coffeescript
:coffeescript
$.get '
#{
gitlab_ci_projects_path
}
', (data) ->
$.get '
#{
gitlab_ci_projects_path
}
', (data) ->
$(".projects").html data.html
$(".projects").html data.html
$('.projects').on 'click', '.reset-cache', ->
$.get '
#{
gitlab_ci_projects_path
}
', { reset_cache: true }, (data) ->
$(".projects").html data.html
false
CiPager.init "
#{
gitlab_ci_projects_path
}
",
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
CiPager.init "
#{
gitlab_ci_projects_path
}
",
#{
Ci
::
ProjectsController
::
PROJECTS_BATCH
}
, false
-
else
-
else
...
...
config/gitlab_ci.yml.example
deleted
100644 → 0
View file @
44261a5d
# If you change this file in a Merge Request, please also create
# a MR on https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests
defaults: &defaults
gitlab_server:
url: 'https://gitlab.example.com/' # Replace with your gitlab server url
app_id: ''
app_secret: ''
## Gitlab CI settings
gitlab_ci:
## Web server settings
host: localhost
port: 80
https: false
## Email settings
# Email address used in the "From" field in mails sent by GitLab-CI
email_from: gitlab-ci@localhost
# Email address of your support contact (default: same as email_from)
support_email: support@localhost
# Default project notifications settings:
#
# Send emails only on broken builds (default: true)
# all_broken_builds: true
#
# Add pusher to recipients list (default: false)
# add_pusher: true
# The location where build traces are stored (default: builds/). Relative paths are relative to Rails.root
# builds_path: builds/
## Backup settings
backup:
path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
# keep_time: 604800 # default: 0 (forever) (in seconds)
# upload:
# # Fog storage connection settings, see http://fog.io/storage/ .
# connection:
# provider: AWS
# region: eu-west-1
# aws_access_key_id: AKIAKIAKI
# aws_secret_access_key: 'secret123'
# # The remote 'directory' to store your backups. For S3, this would be the bucket name.
# remote_directory: 'my.s3.bucket'
# # Use multipart uploads when file size reaches 100MB, see
# # http://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
# multipart_chunk_size: 104857600
development:
<<: *defaults
test:
<<: *defaults
gitlab_server:
url: 'http://demo.gitlab.com/'
app_id: 'id'
app_secret: 'secret'
gitlab_ci:
host: localhost
port: 80
https: false
production:
<<: *defaults
config/gitlab_ci.yml.example.development
deleted
100644 → 0
View file @
44261a5d
development:
gitlab_server:
url: 'http://localhost:3000'
app_id: ''
app_secret: ''
gitlab_ci:
host: localhost
port: 9000
https: false
test:
gitlab_server:
url: 'http://demo.gitlab.com/'
app_id: ''
app_secret: ''
gitlab_ci:
host: localhost
port: 80
https: false
config/initializers/1_settings.rb
View file @
381180bc
...
@@ -18,7 +18,19 @@ class Settings < Settingslogic
...
@@ -18,7 +18,19 @@ class Settings < Settingslogic
host
.
start_with?
(
'www.'
)
?
host
[
4
..-
1
]
:
host
host
.
start_with?
(
'www.'
)
?
host
[
4
..-
1
]
:
host
end
end
private
def
build_gitlab_ci_url
if
gitlab_on_standard_port?
custom_port
=
nil
else
custom_port
=
":
#{
gitlab
.
port
}
"
end
[
gitlab
.
protocol
,
"://"
,
gitlab
.
host
,
custom_port
,
gitlab
.
relative_url_root
].
join
(
''
)
end
def
build_gitlab_shell_ssh_path_prefix
def
build_gitlab_shell_ssh_path_prefix
if
gitlab_shell
.
ssh_port
!=
22
if
gitlab_shell
.
ssh_port
!=
22
...
@@ -160,6 +172,16 @@ Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitla
...
@@ -160,6 +172,16 @@ Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitla
Settings
.
gitlab
[
'restricted_signup_domains'
]
||=
[]
Settings
.
gitlab
[
'restricted_signup_domains'
]
||=
[]
Settings
.
gitlab
[
'import_sources'
]
||=
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
]
Settings
.
gitlab
[
'import_sources'
]
||=
[
'github'
,
'bitbucket'
,
'gitlab'
,
'gitorious'
,
'google_code'
,
'fogbugz'
,
'git'
]
#
# CI
#
Settings
[
'gitlab_ci'
]
||=
Settingslogic
.
new
({})
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
)
Settings
.
gitlab_ci
[
'builds_path'
]
=
File
.
expand_path
(
Settings
.
gitlab_ci
[
'builds_path'
]
||
"builds/"
,
Rails
.
root
+
'/ci'
)
#
#
# Reply by email
# Reply by email
#
#
...
...
config/initializers/3_ci_settings.rb
deleted
100644 → 0
View file @
44261a5d
module
Ci
class
Settings
<
Settingslogic
source
"
#{
Rails
.
root
}
/config/gitlab_ci.yml"
namespace
Rails
.
env
class
<<
self
def
gitlab_ci_on_non_standard_port?
!
[
443
,
80
].
include?
(
gitlab_ci
.
port
.
to_i
)
end
private
def
build_gitlab_ci_url
if
gitlab_ci_on_non_standard_port?
custom_port
=
":
#{
gitlab_ci
.
port
}
"
else
custom_port
=
nil
end
[
gitlab_ci
.
protocol
,
"://"
,
gitlab_ci
.
host
,
custom_port
,
gitlab_ci
.
relative_url_root
].
join
(
''
)
end
end
end
end
#
# GitlabCi
#
Ci
::
Settings
[
'gitlab_ci'
]
||=
Settingslogic
.
new
({})
Ci
::
Settings
.
gitlab_ci
[
'https'
]
=
false
if
Ci
::
Settings
.
gitlab_ci
[
'https'
].
nil?
Ci
::
Settings
.
gitlab_ci
[
'host'
]
||=
'localhost'
Ci
::
Settings
.
gitlab_ci
[
'port'
]
||=
Ci
::
Settings
.
gitlab_ci
.
https
?
443
:
80
Ci
::
Settings
.
gitlab_ci
[
'relative_url_root'
]
||=
(
ENV
[
'RAILS_RELATIVE_URL_ROOT'
]
||
''
)
+
'/ci'
Ci
::
Settings
.
gitlab_ci
[
'protocol'
]
||=
Ci
::
Settings
.
gitlab_ci
.
https
?
"https"
:
"http"
Ci
::
Settings
.
gitlab_ci
[
'email_from'
]
||=
"gitlab-ci@
#{
Ci
::
Settings
.
gitlab_ci
.
host
}
"
Ci
::
Settings
.
gitlab_ci
[
'support_email'
]
||=
Ci
::
Settings
.
gitlab_ci
.
email_from
Ci
::
Settings
.
gitlab_ci
[
'all_broken_builds'
]
=
true
if
Ci
::
Settings
.
gitlab_ci
[
'all_broken_builds'
].
nil?
Ci
::
Settings
.
gitlab_ci
[
'add_pusher'
]
=
false
if
Ci
::
Settings
.
gitlab_ci
[
'add_pusher'
].
nil?
Ci
::
Settings
.
gitlab_ci
[
'url'
]
||=
Ci
::
Settings
.
send
(
:build_gitlab_ci_url
)
Ci
::
Settings
.
gitlab_ci
[
'builds_path'
]
=
File
.
expand_path
(
Ci
::
Settings
.
gitlab_ci
[
'builds_path'
]
||
"builds/"
,
Rails
.
root
+
'/ci'
)
# Compatibility with old config
Ci
::
Settings
[
'gitlab_server_urls'
]
||=
Ci
::
Settings
[
'allowed_gitlab_urls'
]
#
# Backup
#
Ci
::
Settings
[
'backup'
]
||=
Settingslogic
.
new
({})
Ci
::
Settings
.
backup
[
'keep_time'
]
||=
0
Ci
::
Settings
.
backup
[
'path'
]
=
File
.
expand_path
(
Ci
::
Settings
.
backup
[
'path'
]
||
"tmp/backups/"
,
Rails
.
root
)
Ci
::
Settings
.
backup
[
'upload'
]
||=
Settingslogic
.
new
({
'remote_directory'
=>
nil
,
'connection'
=>
nil
})
# Convert upload connection settings to use symbol keys, to make Fog happy
if
Ci
::
Settings
.
backup
[
'upload'
][
'connection'
]
Ci
::
Settings
.
backup
[
'upload'
][
'connection'
]
=
Hash
[
Ci
::
Settings
.
backup
[
'upload'
][
'connection'
].
map
{
|
k
,
v
|
[
k
.
to_sym
,
v
]
}]
end
Ci
::
Settings
.
backup
[
'upload'
][
'multipart_chunk_size'
]
||=
104857600
config/initializers/4_ci_app.rb
View file @
381180bc
...
@@ -5,6 +5,6 @@ module GitlabCi
...
@@ -5,6 +5,6 @@ module GitlabCi
REGISTRATION_TOKEN
=
SecureRandom
.
hex
(
10
)
REGISTRATION_TOKEN
=
SecureRandom
.
hex
(
10
)
def
self
.
config
def
self
.
config
Ci
::
Settings
Settings
end
end
end
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