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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
102e9078
Commit
102e9078
authored
Dec 18, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Grapify Jenkins and Jenkins Deprecated Service API
parent
b0212aa4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
4 deletions
+87
-4
app/models/project_services/jenkins_deprecated_service.rb
app/models/project_services/jenkins_deprecated_service.rb
+4
-4
doc/api/services.md
doc/api/services.md
+36
-0
lib/api/services.rb
lib/api/services.rb
+47
-0
No files found.
app/models/project_services/jenkins_deprecated_service.rb
View file @
102e9078
...
...
@@ -2,8 +2,8 @@ require 'uri'
class
JenkinsDeprecatedService
<
CiService
prop_accessor
:project_url
prop
_accessor
:multiproject_enabled
prop
_accessor
:pass_unstable
boolean
_accessor
:multiproject_enabled
boolean
_accessor
:pass_unstable
validates
:project_url
,
presence:
true
,
if: :activated?
...
...
@@ -46,11 +46,11 @@ class JenkinsDeprecatedService < CiService
end
def
multiproject_enabled?
self
.
multiproject_enabled
==
'1'
Gitlab
::
Utils
.
to_boolean
(
self
.
multiproject_enabled
)
end
def
pass_unstable?
self
.
pass_unstable
==
'1'
Gitlab
::
Utils
.
to_boolean
(
self
.
pass_unstable
)
end
def
build_page
(
sha
,
ref
=
nil
)
...
...
doc/api/services.md
View file @
102e9078
...
...
@@ -808,5 +808,41 @@ Get JetBrains TeamCity CI service settings for a project.
GET /projects/:id/services/teamcity
```
## Jenkins CI
A continuous integration and build server
### Create/Edit Jenkins CI service
Set Jenkins CI service for a project.
```
PUT /projects/:id/services/jenkins
```
Parameters:
-
`jenkins_url`
(
**required**
) - Jenkins URL like http://jenkins.example.com
-
`project_name`
(
**required**
) - The URL-friendly project name. Example: my_project_name
-
`username`
(
**required**
) - A user with permissions to trigger a manual build
-
`password`
(
**required**
)
### Delete Jenkins CI service
Delete Jenkins CI service for a project.
```
DELETE /projects/:id/services/jenkins
```
### Get Jenkins CI service settings
Get Jenkins CI service settings for a project.
```
GET /projects/:id/services/jenkins
```
[
jira-doc
]:
../project_services/jira.md
[
old-jira-api
]:
https://gitlab.com/gitlab-org/gitlab-ce/blob/8-13-stable/doc/api/services.md#jira
lib/api/services.rb
View file @
102e9078
...
...
@@ -526,6 +526,53 @@ module API
type:
String
,
desc:
'The password of the user'
}
],
# EE-specific services
'jenkins'
=>
[
{
required:
true
,
name: :jenkins_url
,
type:
String
,
desc:
'Jenkins URL like http://jenkins.example.com'
},
{
required:
true
,
name: :project_name
,
type:
String
,
desc:
'The URL-friendly project name. Example: my_project_name'
},
{
required:
true
,
name: :username
,
type:
String
,
desc:
'The username with permissions to trigger a manual build'
},
{
required:
true
,
name: :password
,
type:
String
,
desc:
'The password of the user'
}
],
'jenkins-deprecated'
=>
[
{
required:
true
,
name: :project_url
,
type:
String
,
desc:
'Jenkins project URL like http://jenkins.example.com/job/my-project/'
,
},
{
required:
false
,
name: :pass_unstable
,
type:
Boolean
,
desc:
'Multi-project setup enabled?'
,
},
{
required:
false
,
name: :multiproject_enabled
,
type:
Boolean
,
desc:
'hould unstable builds be treated as passing?'
}
]
}.
freeze
...
...
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