public interface JenkinsClient
This interface defines the calls that are useful for Dragom. It is not meant to be a full-featured implementation of the Jenkins API.
Implementations of this interface are intended to be obtained using
ServiceLocator so they can easily be doubled for testing purposes. The
main implementation is DefaultJenkinsClientImpl which therefore has a
no-argument constructor. This is why setup methods such as setBaseUrl(java.lang.String)
are part of this interface.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
JenkinsClient.Build
Represents a build.
|
static class |
JenkinsClient.BuildState
Build states.
|
static class |
JenkinsClient.HttpStatusException
Exception that wraps an HTTP status code.
|
static class |
JenkinsClient.ItemType
Types of items.
|
| Modifier and Type | Method and Description |
|---|---|
JenkinsClient.Build |
build(String job,
Map<String,String> mapBuildParam)
Triggers a build for a job.
|
void |
createJob(String job,
Reader readerConfig)
Creates a regular non-templatized job.
|
boolean |
createSimpleFolder(String folder)
Creates a simple folder.
|
void |
createUpdateJob(String job,
Reader readerConfig)
Creates or updates a regular non-templatized job.
|
void |
createUpdateJobFromTemplate(String template,
String job,
Map<String,String> mapTemplateParam)
Created a job from a template.
|
boolean |
deleteItem(String item)
Deletes an item.
|
JenkinsClient.ItemType |
getItemType(String item)
Returns the
JenkinsClient.ItemType. |
boolean |
isFolderEmpty(String folder) |
void |
setBaseUrl(String baseUrl)
Sets the Jenkins base URL.
|
void |
setPassword(String password)
Sets the password to access Jenkins.
|
void |
setUser(String user)
Sets the user to access Jenkins.
|
void |
updateJob(String job,
Reader readerConfig)
Updates a regular non-templatized job.
|
boolean |
validateCredentials() |
void setBaseUrl(String baseUrl)
baseUrl - See description.void setUser(String user)
user - See description.void setPassword(String password)
setUser(java.lang.String)) is
null.password - See description.boolean validateCredentials()
JenkinsClient.ItemType getItemType(String item)
JenkinsClient.ItemType.
Returns null if the item does not exist.
item - Item (full name).boolean deleteItem(String item)
item - Item (full name).void createUpdateJobFromTemplate(String template, String job, Map<String,String> mapTemplateParam)
template - Template (full name).job - New job (full name).mapTemplateParam - Template parameters.void createJob(String job, Reader readerConfig)
job - New job (full name).readerConfig - Reader providing the configuration of the job.void updateJob(String job, Reader readerConfig)
job - Job (full name).readerConfig - Reader providing the configuration of the job.void createUpdateJob(String job, Reader readerConfig)
job - Job (full name).readerConfig - Reader providing the configuration of the job.JenkinsClient.Build build(String job, Map<String,String> mapBuildParam)
job - Job (full name).mapBuildParam - Build parameters. Can be null.boolean isFolderEmpty(String folder)
boolean createSimpleFolder(String folder)
folder - Folder (full name).Copyright © 2015–2016 AZYVA INC.. All rights reserved.