public class JenkinsServer extends Object
| Constructor and Description |
|---|
JenkinsServer(JenkinsHttpClient client)
Create a new Jenkins server directly from an HTTP client (ADVANCED)
|
JenkinsServer(URI serverUri)
Create a new Jenkins server reference given only the server address
|
JenkinsServer(URI serverUri,
String username,
String passwordOrToken)
Create a new Jenkins server reference given the address and credentials
|
| Modifier and Type | Method and Description |
|---|---|
void |
createJob(String jobName,
String jobXml)
Create a job on the server using the provided xml
|
Map<String,Computer> |
getComputers()
Get a list of all the computers on the server (at the summary level)
|
JobWithDetails |
getJob(String jobName)
Get a single Job from the server.
|
Map<String,Job> |
getJobs()
Get a list of all the defined jobs on the server (at the summary level)
|
String |
getJobXml(String jobName)
Get the xml description of an existing job
|
LabelWithDetails |
getLabel(String labelName)
Get the description of an existing Label
|
void |
updateJob(String jobName,
String jobXml)
Update the xml description of an existing job
|
public JenkinsServer(URI serverUri)
serverUri - address of jenkins server (ex. http://localhost:8080/jenkins)public JenkinsServer(URI serverUri, String username, String passwordOrToken)
serverUri - address of jenkins server (ex. http://localhost:8080/jenkins)username - username to use when connectingpasswordOrToken - password (not recommended) or token (recommended)public JenkinsServer(JenkinsHttpClient client)
client - Specialized client to use.public Map<String,Job> getJobs() throws IOException
IOExceptionpublic JobWithDetails getJob(String jobName) throws IOException
IOExceptionpublic void createJob(String jobName, String jobXml) throws IOException
IOExceptionpublic String getJobXml(String jobName) throws IOException
IOExceptionpublic LabelWithDetails getLabel(String labelName) throws IOException
IOExceptionpublic Map<String,Computer> getComputers() throws IOException
IOExceptionpublic void updateJob(String jobName, String jobXml) throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.