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
a30b68fe
Unverified
Commit
a30b68fe
authored
Oct 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move CI services to project settings area
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
1e06cabf
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
61 deletions
+21
-61
CHANGELOG
CHANGELOG
+1
-0
ci_services_controller.rb
app/controllers/projects/ci_services_controller.rb
+9
-19
_nav_project.html.haml
app/views/layouts/ci/_nav_project.html.haml
+0
-5
_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+2
-2
_form.html.haml
app/views/projects/ci_services/_form.html.haml
+2
-5
edit.html.haml
app/views/projects/ci_services/edit.html.haml
+0
-0
index.html.haml
app/views/projects/ci_services/index.html.haml
+1
-1
routes.rb
config/routes.rb
+6
-6
commits_controller_spec.rb
spec/controllers/ci/commits_controller_spec.rb
+0
-23
No files found.
CHANGELOG
View file @
a30b68fe
...
...
@@ -33,6 +33,7 @@ v 8.1.0 (unreleased)
- Add user preference to change layout width (Peter Göbel)
- Use commit status in merge request widget as preffered source of CI status
- Integrate CI commit and build pages into project pages
- Move CI services page to project settings area
v 8.0.4
- Fix Message-ID header to be RFC 2111-compliant to prevent e-mails being dropped (Stan Hu)
...
...
app/controllers/
ci/
services_controller.rb
→
app/controllers/
projects/ci_
services_controller.rb
View file @
a30b68fe
module
Ci
class
ServicesController
<
Ci
::
ApplicationController
before_action
:authenticate_user!
before_action
:project
before_action
:authorize_access_project!
before_action
:authorize_manage_project!
before_action
:service
,
only:
[
:edit
,
:update
,
:test
]
class
Projects
::
CiServicesController
<
Projects
::
ApplicationController
before_action
:ci_project
before_action
:authorize_admin_project!
respond_to
:html
layout
'ci/project'
layout
"project_settings"
def
index
@
project
.
build_missing_services
@services
=
@
project
.
services
.
reload
@ci_
project
.
build_missing_services
@services
=
@ci_
project
.
services
.
reload
end
def
edit
service
end
def
update
if
@service
.
update_attributes
(
service_params
)
redirect_to
edit_ci_project_service_path
(
@project
,
@service
.
to_param
)
redirect_to
edit_namespace_project_ci_service_path
(
@project
,
@project
.
namespace
,
@service
.
to_param
)
else
render
'edit'
end
...
...
@@ -40,12 +35,8 @@ module Ci
private
def
project
@project
=
Ci
::
Project
.
find
(
params
[
:project_id
])
end
def
service
@service
||=
@
project
.
services
.
find
{
|
service
|
service
.
to_param
==
params
[
:id
]
}
@service
||=
@ci_
project
.
services
.
find
{
|
service
|
service
.
to_param
==
params
[
:id
]
}
end
def
service_params
...
...
@@ -55,5 +46,4 @@ module Ci
:hipchat_token
,
:hipchat_room
,
:hipchat_server
)
end
end
end
app/views/layouts/ci/_nav_project.html.haml
View file @
a30b68fe
...
...
@@ -5,11 +5,6 @@
%span
Back to project
%li
.separate-item
=
nav_link
path:
[
'services#index'
,
'services#edit'
]
do
=
link_to
ci_project_services_path
(
@project
)
do
=
icon
(
'share fw'
)
%span
Services
=
nav_link
path:
'events#index'
do
=
link_to
ci_project_events_path
(
@project
)
do
=
icon
(
'book fw'
)
...
...
app/views/layouts/nav/_project_settings.html.haml
View file @
a30b68fe
...
...
@@ -60,8 +60,8 @@
=
icon
(
'building fw'
)
%span
CI Settings
=
nav_link
path:
[
'ci/services#index'
,
'ci/services#edit'
]
do
=
link_to
ci_project_services_path
(
@project
.
gitlab_ci_
project
)
do
=
nav_link
controller:
'ci_services'
do
=
link_to
namespace_project_ci_services_path
(
@project
.
namespace
,
@
project
)
do
=
icon
(
'share fw'
)
%span
CI Services
...
...
app/views/
ci/
services/_form.html.haml
→
app/views/
projects/ci_
services/_form.html.haml
View file @
a30b68fe
...
...
@@ -4,13 +4,10 @@
%p
=
@service
.
description
.back-link
=
link_to
ci_project_services_path
(
@project
)
do
←
to services
%hr
=
form_for
(
@service
,
as: :service
,
url:
ci_project_service_path
(
@project
,
@service
.
to_param
),
method: :put
,
html:
{
class:
'form-horizontal'
})
do
|
f
|
=
form_for
(
@service
,
as: :service
,
url:
namespace_project_ci_service_path
(
@project
.
namespace
,
@project
,
@service
.
to_param
),
method: :put
,
html:
{
class:
'form-horizontal'
})
do
|
f
|
-
if
@service
.
errors
.
any?
.alert.alert-danger
%ul
...
...
@@ -54,4 +51,4 @@
=
f
.
submit
'Save'
,
class:
'btn btn-save'
-
if
@service
.
valid?
&&
@service
.
activated?
&&
@service
.
can_test?
=
link_to
'Test settings'
,
test_
ci_project_service_path
(
@project
,
@service
.
to_param
),
class:
'btn'
=
link_to
'Test settings'
,
test_
namespace_project_ci_service_path
(
@project
.
namespace
,
@project
,
@service
.
to_param
),
class:
'btn'
app/views/
ci/
services/edit.html.haml
→
app/views/
projects/ci_
services/edit.html.haml
View file @
a30b68fe
File moved
app/views/
ci/
services/index.html.haml
→
app/views/
projects/ci_
services/index.html.haml
View file @
a30b68fe
...
...
@@ -13,7 +13,7 @@
%td
=
boolean_to_icon
service
.
activated?
%td
=
link_to
edit_
ci_project_service_path
(
@project
,
service
.
to_param
)
do
=
link_to
edit_
namespace_project_ci_service_path
(
@project
.
namespace
,
@project
,
service
.
to_param
)
do
%strong
=
service
.
title
%td
=
service
.
description
...
...
config/routes.rb
View file @
a30b68fe
...
...
@@ -22,12 +22,6 @@ Gitlab::Application.routes.draw do
get
:dumped_yaml
end
resources
:services
,
only:
[
:index
,
:edit
,
:update
]
do
member
do
get
:test
end
end
resources
:runner_projects
,
only:
[
:create
,
:destroy
]
resources
:events
,
only:
[
:index
]
...
...
@@ -576,6 +570,12 @@ Gitlab::Application.routes.draw do
end
end
resources
:ci_services
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:edit
,
:update
]
do
member
do
get
:test
end
end
resources
:builds
,
only:
[
:show
]
do
member
do
get
:cancel
...
...
spec/controllers/ci/commits_controller_spec.rb
deleted
100644 → 0
View file @
1e06cabf
require
"spec_helper"
describe
Ci
::
CommitsController
do
describe
"GET /status"
do
it
"returns status of commit"
do
commit
=
FactoryGirl
.
create
:ci_commit
get
:status
,
id:
commit
.
sha
,
ref_id:
commit
.
ref
,
project_id:
commit
.
project
.
id
expect
(
response
).
to
be_success
expect
(
response
.
code
).
to
eq
(
'200'
)
JSON
.
parse
(
response
.
body
)[
"status"
]
==
"pending"
end
it
"returns not_found status"
do
commit
=
FactoryGirl
.
create
:ci_commit
get
:status
,
id:
commit
.
sha
,
ref_id:
"deploy"
,
project_id:
commit
.
project
.
id
expect
(
response
).
to
be_success
expect
(
response
.
code
).
to
eq
(
'200'
)
JSON
.
parse
(
response
.
body
)[
"status"
]
==
"not_found"
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