code
stringlengths 25
201k
| docstring
stringlengths 19
96.2k
| func_name
stringlengths 0
235
| language
stringclasses 1
value | repo
stringlengths 8
51
| path
stringlengths 11
314
| url
stringlengths 62
377
| license
stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
public AssetContainer toAssetContainer(DatasourceInstance dsInstance) {
DatasourceInstanceAsset asset = DatasourceInstanceAsset.builder()
.instanceUuid(dsInstance.getUuid())
.assetId(String.valueOf(this.deptId))
.name(this.name)
.assetKey(String.valueOf(this.deptId))
.assetType(DsAssetTypeConstants.DINGTALK_DEPARTMENT.name())
.kind("department")
.build();
return AssetContainerBuilder.newBuilder()
.paramAsset(asset)
.paramProperty("parentId", this.parentId)
.build();
}
|
https://developers.dingtalk.com/document/app/query-department-details0-v2
|
toAssetContainer
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-dingtalk/src/main/java/com/baiyi/opscloud/datasource/dingtalk/entity/DingtalkDepartment.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-dingtalk/src/main/java/com/baiyi/opscloud/datasource/dingtalk/entity/DingtalkDepartment.java
|
Apache-2.0
|
public boolean isRunning() {
try {
client.get("/");
return true;
} catch (IOException e) {
log.debug("isRunning()", e);
return false;
}
}
|
Get the current status of the Jenkins end-point by pinging it.
@return true if Jenkins is up and running, false otherwise
|
isRunning
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, Job> getJobs() throws IOException {
return getJobs(null, null);
}
|
Get a list of all the defined jobs on the server (at the summary level)
@return list of defined jobs (summary level, for details @see Job#details
@throws IOException in case of an error.
|
getJobs
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, Job> getJobs(FolderJob folder) throws IOException {
return getJobs(folder, null);
}
|
Get a list of all the defined jobs on the server (in the given folder)
@param folder {@link FolderJob}
@return list of defined jobs (summary level, for details @see Job#details
@throws IOException in case of an error.
|
getJobs
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, Job> getJobs(String view) throws IOException {
return getJobs(null, view);
}
|
Get a list of all the defined jobs on the server (at the specified view
level)
@param view The view to get jobs from.
@return list of defined jobs (view level, for details @see Job#details
@throws IOException in case of an error.
|
getJobs
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, Job> getJobs(FolderJob folder, String view) throws IOException {
String path = UrlUtils.toBaseUrl(folder);
Class<? extends MainView> viewClass = MainView.class;
if (view != null) {
path = Joiner.on("").join(path, "view/", EncodingUtils.encode(view), "/");
viewClass = View.class;
}
List<Job> jobs = client.get(path, viewClass).getJobs();
return jobs.stream()
.map(SET_CLIENT(this.client))
.collect(toMap(Job::getName, s -> s));
}
|
Get a list of all the defined jobs on the server (at the specified view
level and in the specified folder)
@param folder {@link FolderJob}
@param view The view to use.
@return list of defined jobs (view level, for details @see Job#details
@throws IOException in case of an error.
|
getJobs
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, View> getViews() throws IOException {
return getViews(null);
}
|
Get a list of all the defined views on the server (at the summary level)
@return list of defined views
@throws IOException in case of an error.
|
getViews
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, View> getViews(FolderJob folder) throws IOException {
// This is much better than using &depth=2
// http://localhost:8080/api/json?pretty&tree=views[name,url,jobs[name,url]]
List<View> views = client.get(UrlUtils.toBaseUrl(folder) + "?tree=views[name,url,jobs[name,url]]", MainView.class).getViews();
//TODO: Think about this Lambda. It's too large? Make it smaller!
return views.stream().peek(view -> {
SET_CLIENT(this.client);
// TODO: Think about the following? Does there exists a simpler/more
// elegant method?
for (Job job : view.getJobs()) {
SET_CLIENT(this.client);
}
for (View viewView : view.getViews()) {
SET_CLIENT(this.client);
}
}).collect(Collectors.toMap(View::getName, v -> v));
}
|
Get a list of all the defined views on the server (at the summary level
and in the given folder)
@param folder {@link FolderJob}
@return list of defined views
@throws IOException in case of an error.
|
getViews
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public View getView(String name) throws IOException {
return getView(null, name);
}
|
Get a single view object from the server
@param name name of the view in Jenkins
@return the view object
@throws IOException in case of an error.
|
getView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public View getView(FolderJob folder, String name) throws IOException {
try {
View resultView = client.get(UrlUtils.toViewBaseUrl(folder, name) + "/", View.class);
resultView.setClient(client);
// TODO: Think about the following? Does there exists a simpler/more
// elegant method?
for (Job job : resultView.getJobs()) {
job.setClient(client);
}
for (View view : resultView.getViews()) {
view.setClient(client);
}
return resultView;
} catch (HttpResponseException e) {
log.debug("getView(folder={}, name={}) status={}", folder, name, e.getStatusCode());
if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
// TODO: Think hard about this.
return null;
}
throw e;
}
}
|
Get a single view object from the given folder
@param folder The name of the folder.
@param name name of the view in Jenkins
@return the view object
@throws IOException in case of an error.
|
getView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JobWithDetails getJob(String jobName) throws IOException {
return getJob(null, UrlUtils.toFullJobPath(jobName));
}
|
Get a single Job from the server.
@param jobName name of the job to get details of.
@return A single Job, null if not present
@throws IOException in case of an error.
|
getJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createJob(String jobName, String jobXml) throws IOException {
return createJob(null, jobName, jobXml, false);
}
|
Create a job on the server using the provided xml
@param jobName name of the job to be created.
@param jobXml the <code>config.xml</code> which should be used to create
the job.
@throws IOException in case of an error.
|
createJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createJob(String jobName, String jobXml, Boolean crumbFlag) throws IOException {
return createJob(null, jobName, jobXml, crumbFlag);
}
|
Create a job on the server using the provided xml
@param jobName name of the job to be created.
@param jobXml the <code>config.xml</code> which should be used to create
the job.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createJob(FolderJob folder, String jobName, String jobXml) throws IOException {
return createJob(folder, jobName, jobXml, false);
}
|
Create a job on the server using the provided xml and in the provided
folder
@param folder {@link FolderJob}
@param jobName name of the job to be created.
@param jobXml the <code>config.xml</code> which should be used to create
the job.
@throws IOException in case of an error.
|
createJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createJob(FolderJob folder, String jobName, String jobXml, Boolean crumbFlag)
throws IOException {
client.post_xml(UrlUtils.toBaseUrl(folder) + "createItem?name=" + EncodingUtils.formParameter(jobName), jobXml, crumbFlag);
return this;
}
|
Create a job on the server using the provided xml and in the provided
folder
@param folder {@link FolderJob}
@param jobName name of the job to be created.
@param jobXml the <code>config.xml</code> which should be used to create
the job.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createView(String viewName, String viewXml) throws IOException {
return createView(null, viewName, viewXml, false);
}
|
Create a view on the server using the provided xml
@param viewName name of the view to be created.
@param viewXml The configuration for the view.
@throws IOException in case of an error.
|
createView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createView(String viewName, String viewXml, Boolean crumbFlag) throws IOException {
return createView(null, viewName, viewXml, crumbFlag);
}
|
Create a view on the server using the provided xml.
@param viewName name of the view to be created.
@param viewXml The configuration for the view.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createView(FolderJob folder, String viewName, String viewXml) throws IOException {
return createView(folder, viewName, viewXml, false);
}
|
Create a view on the server using the provided xml and in the provided
folder.
@param folder {@link FolderJob}
@param viewName name of the view to be created.
@param viewXml The configuration for the view.
@throws IOException in case of an error.
|
createView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createView(FolderJob folder, String viewName, String viewXml, Boolean crumbFlag)
throws IOException {
client.post_xml(UrlUtils.toBaseUrl(folder) + "createView?name=" + EncodingUtils.formParameter(viewName), viewXml,
crumbFlag);
return this;
}
|
Create a view on the server using the provided xml and in the provided
folder.
@param folder the folder.
@param viewName the view name.
@param viewXml the view xml.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createView
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createFolder(String folderName) throws IOException {
return createFolder(null, folderName, false);
}
|
Create a folder on the server (in the root)
@param folderName name of the folder.
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createFolder(String folderName, Boolean crumbFlag) throws IOException {
return createFolder(null, folderName, crumbFlag);
}
|
Create a folder on the server (in the root)
@param folderName name of the folder.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createFolder(FolderJob folder, String jobName) throws IOException {
return createFolder(folder, jobName, false);
}
|
Create a job on the server (in the given folder)
@param folder {@link FolderJob}
@param jobName name of the job.
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer createFolder(FolderJob folder, String jobName, Boolean crumbFlag) throws IOException {
// https://gist.github.com/stuart-warren/7786892 was slightly helpful
// here
//TODO: JDK9+: Map.of(...)
Map<String, String> params = Maps.newHashMap();
params.put("mode", "com.cloudbees.hudson.plugins.folder.Folder");
params.put("name", jobName);
params.put("from", "");
params.put("Submit", "OK");
client.post_form(UrlUtils.toBaseUrl(folder) + "createItem?", params, crumbFlag);
return this;
}
|
Create a job on the server (in the given folder)
@param folder {@link FolderJob}
@param jobName name of the job.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public String getJobXml(String jobName) throws IOException {
return getJobXml(null, jobName);
}
|
Get the xml description of an existing job
@param jobName name of the job.
@return the new job object
@throws IOException in case of an error.
|
getJobXml
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public String getJobXml(FolderJob folder, String jobName) throws IOException {
return client.get(UrlUtils.toJobBaseUrl(folder, jobName) + "/config.xml");
}
|
Get the xml description of an existing job.
@param jobName name of the job.
@param folder {@link FolderJob}
@return the new job object
@throws IOException in case of an error.
|
getJobXml
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public LabelWithDetails getLabel(String labelName) throws IOException {
return client.get("/label/" + EncodingUtils.encode(labelName), LabelWithDetails.class);
}
|
Get the description of an existing Label
@param labelName name of the label.
@return {@link LabelWithDetails}
@throws IOException in case of an error.
|
getLabel
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public Map<String, Computer> getComputers() throws IOException {
List<Computer> computers = client.get("computer/", Computer.class).getComputers();
return computers.stream()
.map(SET_CLIENT(this.client))
.collect(Collectors.toMap(s -> s.getDisplayName().toLowerCase(), Function.identity()));
}
|
Get a list of all the computers on the server (at the summary level)
@return map of defined computers (summary level, for details @see
Computer#details
@throws IOException in case of an error.
|
getComputers
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public ComputerSet getComputerSet() throws IOException {
return client.get("computer/?depth=2", ComputerSet.class);
}
|
The ComputerSet class will give informations like
{@link ComputerSet#getBusyExecutors()} or the
{@link ComputerSet#getTotalExecutors()}.
@return {@link ComputerSet}
@throws IOException in case of an error.
|
getComputerSet
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public PluginManager getPluginManager() throws IOException {
return client.get("pluginManager/?depth=2", PluginManager.class);
}
|
This will give you back the {@link PluginManager}.
@return {@link PluginManager}
@throws IOException in case of a failure.
|
getPluginManager
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer updateJob(String jobName, String jobXml) throws IOException {
return this.updateJob(jobName, jobXml, true);
}
|
Update the xml description of an existing job
@param jobName name of the job to be updated.
@param jobXml the configuration to be used for updating.
@throws IOException in case of an error.
|
updateJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer updateJob(String jobName, String jobXml, boolean crumbFlag) throws IOException {
return updateJob(null, jobName, jobXml, crumbFlag);
}
|
Update the xml description of an existing job
@param jobName name of the job to be updated.
@param jobXml the configuration to be used for updating.
@param crumbFlag true/false.
@throws IOException in case of an error.
|
updateJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer updateJob(FolderJob folder, String jobName, String jobXml, boolean crumbFlag)
throws IOException {
client.post_xml(UrlUtils.toJobBaseUrl(folder, jobName) + "/config.xml", jobXml, crumbFlag);
return this;
}
|
Update the xml description of an existing job
@param folder the folder.
@param jobName the name of the job.
@param jobXml the job xml configuration.
@param crumbFlag true/false.
@throws IOException in case of an error.
|
updateJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer addStringParam(String jobName, String name, String description, String defaultValue)
throws IOException, JAXBException, DocumentException {
String jobXml = this.getJobXml(jobName);
JobConfiguration jobConf = new JobConfiguration(jobXml);
jobXml = jobConf.addStringParam(name, description, defaultValue).asXml();
return this.updateJob(jobName, jobXml);
}
|
@param jobName name of the job.
@param name name of the formParameter.
@param description of the parameters.
@param defaultValue the defaultValue for the parameters.
@throws IOException in case of an error.
@throws JAXBException in case of an error.
@throws DocumentException in case of an error.
|
addStringParam
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer quietDown() throws IOException {
try {
client.post("/quietDown/");
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("quietDown()", e);
}
return this;
}
|
Sends the Quiet Down (Prepare for shutdown) message
@throws IOException in case of an error.
|
quietDown
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer cancelQuietDown() throws IOException {
try {
client.post("/cancelQuietDown/");
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("cancelQuietDown()", e);
}
return this;
}
|
Cancels the Quiet Down (Prepare for shutdown) message
@throws IOException in case of an error.
|
cancelQuietDown
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer deleteJob(FolderJob folder, String jobName) throws IOException {
return deleteJob(folder, jobName, false);
}
|
Delete a job from Jenkins within a folder.
@param folder The folder where the given job is located.
@param jobName The job which should be deleted.
@throws IOException in case of an error.
|
deleteJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer deleteJob(FolderJob folder, String jobName, boolean crumbFlag) throws IOException {
client.post(UrlUtils.toJobBaseUrl(folder, jobName) + "/doDelete", crumbFlag);
return this;
}
|
Delete a job from Jenkins within a folder.
@param folder The folder where the given job is located.
@param jobName The job which should be deleted.
@param crumbFlag The crumbFlag
@throws IOException in case of problems.
|
deleteJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer deleteJob(String jobName) throws IOException {
return deleteJob(jobName, false);
}
|
Delete a job from jenkins
@param jobName The name of the job which should be deleted.
@throws IOException in case of an error.
|
deleteJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer deleteJob(String jobName, boolean crumbFlag) throws IOException {
client.post("/job/" + EncodingUtils.encode(jobName) + "/doDelete", crumbFlag);
return this;
}
|
Delete a job from Jenkins.
@param jobName The name of the job to be deleted.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException In case of an failure.
|
deleteJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer disableJob(String jobName) throws IOException {
return disableJob(jobName, false);
}
|
Disable a job from jenkins
@param jobName The name of the job which should be disabled.
@throws IOException in case of an error.
|
disableJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer disableJob(String jobName, boolean crumbFlag) throws IOException {
client.post("/job/" + EncodingUtils.encode(jobName) + "/disable", crumbFlag);
return this;
}
|
Disable a job from Jenkins.
@param jobName The name of the job to be deleted.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException In case of an failure.
|
disableJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer enableJob(String jobName) throws IOException {
return enableJob(jobName, false);
}
|
Enable a job from jenkins
@param jobName name of the job which should be enabled.
@throws IOException In case of an failure.
|
enableJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer enableJob(String jobName, boolean crumbFlag) throws IOException {
client.post("/job/" + EncodingUtils.encode(jobName) + "/enable", crumbFlag);
return this;
}
|
Enable a job from Jenkins.
@param jobName The name of the job to be deleted.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException In case of an failure.
|
enableJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public String runScript(String script) throws IOException {
return runScript(script, false);
}
|
Runs the provided groovy script on the server and returns the result.
<p>
This is similar to running groovy scripts using the script console.
<p>
In the instance where your script causes an exception, the server still
returns a 200 status, so detecting errors is very challenging. It is
recommended to use heuristics to check your return string for stack
traces by detecting strings like "groovy.lang.(something)Exception".
@param script The script to be executed.
@return results The results of the script.
@throws IOException in case of an error.
|
runScript
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer renameJob(String oldJobName, String newJobName) throws IOException {
return renameJob(null, oldJobName, newJobName, false);
}
|
Rename a job
@param oldJobName existing job name.
@param newJobName The new job name.
@throws IOException In case of a failure.
|
renameJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer renameJob(String oldJobName, String newJobName, Boolean crumbFlag) throws IOException {
renameJob(null, oldJobName, newJobName, crumbFlag);
return this;
}
|
Rename a job
@param oldJobName existing job name.
@param newJobName The new job name.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException In case of a failure.
|
renameJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer renameJob(FolderJob folder, String oldJobName, String newJobName) throws IOException {
return renameJob(folder, oldJobName, newJobName, false);
}
|
Rename a job
@param folder {@link FolderJob}
@param oldJobName existing job name.
@param newJobName The new job name.
@throws IOException In case of a failure.
|
renameJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer renameJob(FolderJob folder, String oldJobName, String newJobName, Boolean crumbFlag)
throws IOException {
client.post(UrlUtils.toJobBaseUrl(folder, oldJobName)
+ "/doRename?newName=" + EncodingUtils.formParameter(newJobName),
crumbFlag);
return this;
}
|
Rename a job
@param folder {@link FolderJob}
@param oldJobName existing job name.
@param newJobName The new job name.
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b>
<code>false</code> otherwise.
@throws IOException In case of a failure.
|
renameJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
@Override
public void close() {
client.close();
}
|
Closes underlying resources.
Closed instances should no longer be used
Closing an already closed instance has no side effects
|
close
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer restart(Boolean crumbFlag) throws IOException {
try {
client.post("/restart", crumbFlag);
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("restart()", e);
}
return this;
}
|
Restart Jenkins without waiting for any existing build to complete
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code>
otherwise.
@throws IOException in case of an error.
|
restart
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer safeRestart(Boolean crumbFlag) throws IOException {
try {
client.post("/safeRestart", crumbFlag);
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("safeRestart()", e);
}
return this;
}
|
safeRestart: Puts Jenkins into the quiet mode, wait for existing builds
to be completed, and then restart Jenkins
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code>
otherwise.
@throws IOException in case of an error.
|
safeRestart
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer exit(Boolean crumbFlag) throws IOException {
try {
client.post("/exit", crumbFlag);
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("exit()", e);
}
return this;
}
|
Shutdown Jenkins without waiting for any existing build to complete
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code>
otherwise.
@throws IOException in case of an error.
|
exit
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public JenkinsServer safeExit(Boolean crumbFlag) throws IOException {
try {
client.post("/safeExit", crumbFlag);
} catch (org.apache.http.client.ClientProtocolException e) {
log.error("safeExit()", e);
}
return this;
}
|
safeExit: Puts Jenkins into the quiet mode, wait for existing builds to
be completed, and then shut down Jenkins
@param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code>
otherwise.
@throws IOException in case of an error.
|
safeExit
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsServer.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName) throws IOException, InterruptedException {
return triggerJobAndWaitUntilFinished(jobName, false);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, Map<String, String> params)
throws IOException, InterruptedException {
return triggerJobAndWaitUntilFinished(jobName, params, false);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@param params the job parameters
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, Map<String, String> params,
boolean crumbFlag) throws IOException, InterruptedException {
JobWithDetails job = this.server.getJob(jobName);
QueueReference queueRef = job.build(params, crumbFlag);
return triggerJobAndWaitUntilFinished(jobName, queueRef);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@param params the job parameters
@param crumbFlag set to <code>true</code> or <code>false</code>.
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, Map<String, String> params,
Map<String, File> fileParams,
boolean crumbFlag) throws IOException, InterruptedException {
JobWithDetails job = this.server.getJob(jobName);
QueueReference queueRef = job.build(params, fileParams, crumbFlag);
return triggerJobAndWaitUntilFinished(jobName, queueRef);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@param params the job parameters
@param fileParams the job file parameters
@param crumbFlag set to <code>true</code> or <code>false</code>.
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, Map<String, String> params,
Map<String, File> fileParams) throws IOException, InterruptedException {
return triggerJobAndWaitUntilFinished(jobName, params, fileParams, false);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@param params the job parameters
@param fileParams the job file parameters
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
public BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, boolean crumbFlag)
throws IOException, InterruptedException {
JobWithDetails job = this.server.getJob(jobName);
QueueReference queueRef = job.build(crumbFlag);
return triggerJobAndWaitUntilFinished(jobName, queueRef);
}
|
This method will trigger a build of the given job and will wait until the
builds is ended or if the build has been cancelled.
@param jobName The name of the job which should be triggered.
@param crumbFlag set to <code>true</code> or <code>false</code>.
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
private BuildWithDetails triggerJobAndWaitUntilFinished(String jobName, QueueReference queueRef)
throws IOException, InterruptedException {
JobWithDetails job = this.server.getJob(jobName);
QueueItem queueItem = this.server.getQueueItem(queueRef);
while (!queueItem.isCancelled() && job.isInQueue()) {
// Thread.sleep(retryInterval);
NewTimeUtil.millisecondsSleep(retryInterval);
job = this.server.getJob(jobName);
queueItem = this.server.getQueueItem(queueRef);
}
Build build = server.getBuild(queueItem);
if (queueItem.isCancelled()) {
return build.details();
}
boolean isBuilding = build.details().isBuilding();
while (isBuilding) {
NewTimeUtil.millisecondsSleep(retryInterval);
//Thread.sleep(retryInterval);
isBuilding = build.details().isBuilding();
}
return build.details();
}
|
@param jobName The name of the job.
@param queueRef {@link QueueReference}
@return In case of an cancelled job you will get
{@link BuildWithDetails#getResult()}
{@link BuildResult#CANCELLED}. So you have to check first if the
build result is {@code CANCELLED}.
@throws IOException in case of errors.
@throws InterruptedException In case of interrupts.
|
triggerJobAndWaitUntilFinished
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/JenkinsTriggerHelper.java
|
Apache-2.0
|
@Override
public void close() {
try {
client.close();
} catch (final IOException ex) {
log.debug("I/O exception closing client", ex);
}
}
|
Closes underlying resources. Any I/O errors whilst closing are logged
with debug log level Closed instances should no longer be used Closing an
already closed instance has no side effects
|
close
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
Apache-2.0
|
protected static HttpClientBuilder addAuthentication(final HttpClientBuilder builder, final URI uri, final String username, String password) {
if (StringUtils.isNotBlank(username)) {
CredentialsProvider provider = new BasicCredentialsProvider();
AuthScope scope = new AuthScope(uri.getHost(), uri.getPort(), "realm");
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(username, password);
provider.setCredentials(scope, credentials);
builder.setDefaultCredentialsProvider(provider);
builder.addInterceptorFirst(new PreemptiveAuth());
}
return builder;
}
|
Add authentication to supplied builder.
@param builder the builder to configure
@param uri the server URI
@param username the username
@param password the password
@return the passed in builder
|
addAuthentication
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
Apache-2.0
|
protected HttpContext getLocalContext() {
return localContext;
}
|
Get the local context.
@return context
|
getLocalContext
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/JenkinsHttpClient.java
|
Apache-2.0
|
@Override
public void close() throws IOException {
super.close();
httpRequestBase.releaseConnection();
}
|
Closes this input stream and releases any system resources associated
with the stream. This method simply performs <code>in.close()</code>.
@throws IOException
if an I/O error occurs.
@see FilterInputStream#in
|
close
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/RequestReleasingInputStream.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/RequestReleasingInputStream.java
|
Apache-2.0
|
public static String getJenkinsVersion(final HttpResponse response) {
final Header[] hdrs = response.getHeaders("X-Jenkins");
return hdrs.length == 0 ? "" : hdrs[0].getValue();
}
|
Get Jenkins version from supplied response if any.
@param response the response
@return the version or empty string
|
getJenkinsVersion
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/ResponseUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/ResponseUtils.java
|
Apache-2.0
|
public static String toBaseUrl(final FolderJob folder) {
return folder == null ? "/" : folder.getUrl();
}
|
Helper to create a base url in case a folder is given
@param folder the folder or {@code null}
@return The created base url.
|
toBaseUrl
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static String toJobBaseUrl(final FolderJob folder, final String jobName) {
final StringBuilder sb = new StringBuilder(DEFAULT_BUFFER_SIZE);
sb.append(UrlUtils.toBaseUrl(folder));
if (sb.charAt(sb.length() - 1) != '/') {
sb.append('/');
}
sb.append("job/");
final String[] jobNameParts = jobName.split("/");
for (int i = 0; i < jobNameParts.length; i++) {
sb.append(EncodingUtils.encode(jobNameParts[i]));
if (i != jobNameParts.length - 1) {
sb.append('/');
}
}
return sb.toString();
}
|
Helper to create the base url for a job, with or without a given folder
@param folder the folder or {@code null}
@param jobName the name of the job.
@return converted base url.
|
toJobBaseUrl
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static String toViewBaseUrl(final FolderJob folder, final String name) {
final StringBuilder sb = new StringBuilder(DEFAULT_BUFFER_SIZE);
final String base = UrlUtils.toBaseUrl(folder);
sb.append(base);
if (!base.endsWith("/")) {
sb.append('/');
}
sb.append("view/")
.append(EncodingUtils.encode(name));
return sb.toString();
}
|
Helper to create the base url for a view, with or without a given folder
@param folder the folder or {@code null}
@param name the of the view.
@return converted view url.
|
toViewBaseUrl
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static String toFullJobPath(final String jobName) {
final String[] parts = jobName.split("/");
if (parts.length == 1) {
return parts[0];
}
final StringBuilder sb = new StringBuilder(DEFAULT_BUFFER_SIZE);
for (int i = 0; i < parts.length; i++) {
sb.append(parts[i]);
if (i != parts.length -1) {
sb.append("/job/");
}
}
return sb.toString();
}
|
Parses the provided job name for folders to get the full path for the job.
@param jobName the fullName of the job.
@return the path of the job including folders if present.
|
toFullJobPath
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static String join(final String path1, final String path2) {
if (path1.isEmpty() && path2.isEmpty()) {
return "";
}
if (path1.isEmpty()) {
return path2;
}
if (path2.isEmpty()) {
return path1;
}
final StringBuilder sb = new StringBuilder(DEFAULT_BUFFER_SIZE);
sb.append(path1);
if (sb.charAt(sb.length() - 1) == '/') {
sb.setLength(sb.length() - 1);
}
if (path2.charAt(0) != '/') {
sb.append('/');
}
sb.append(path2);
return sb.toString();
}
|
Join two paths together taking into account leading/trailing slashes.
@param path1 the first path
@param path2 the second path
@return the joins path
|
join
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static URI toJsonApiUri(final URI uri, final String context, final String path) {
String p = path;
if (!p.matches("(?i)https?://.*")) {
p = join(context, p);
}
if (!p.contains("?")) {
p = join(p, "api/json");
} else {
final String[] components = p.split("\\?", 2);
p = join(components[0], "api/json") + "?" + components[1];
}
return uri.resolve("/").resolve(p.replace(" ", "%20"));
}
|
Create a JSON URI from the supplied parameters.
@param uri the server URI
@param context the server context if any
@param path the specific API path
@return new full URI instance
|
toJsonApiUri
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static URI toNoApiUri(final URI uri, final String context, final String path) {
final String p = path.matches("(?i)https?://.*") ? path : join(context, path);
return uri.resolve("/").resolve(p);
}
|
Create a URI from the supplied parameters.
@param uri the server URI
@param context the server context if any
@param path the specific API path
@return new full URI instance
|
toNoApiUri
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/client/util/UrlUtils.java
|
Apache-2.0
|
public static void main(String... args) {
System.out.println("Display parameters as parsed by Maven (in canonical form) and comparison result:");
if (args.length == 0) {
return;
}
ComparableVersion prev = null;
int i = 1;
for (String version : args) {
ComparableVersion c = new ComparableVersion(version);
if (prev != null) {
int compare = prev.compareTo(c);
System.out.println(" " + prev.toString() + ' '
+ ((compare == 0) ? "==" : ((compare < 0) ? "<" : ">")) + ' ' + version);
}
System.out.println(String.valueOf(i++) + ". " + version + " == " + c.getCanonical());
prev = c;
}
}
|
Main to test version parsing and comparison.
@param args the version strings to parse and compare
|
main
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/helper/ComparableVersion.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/helper/ComparableVersion.java
|
Apache-2.0
|
public List<Build> getAllBuilds() {
return this.allBuilds;
}
|
This class is only needed to get all builds in
{@link JobWithDetails#getAllBuilds()}.
@author Karl Heinz Marbaise
NOTE: This class is not part of any public API
|
getAllBuilds
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/AllBuilds.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/AllBuilds.java
|
Apache-2.0
|
public List<MavenBuild> getAllBuilds() {
return this.allBuilds;
}
|
This class is only needed to get all builds in
{@link MavenJobWithDetails#getAllBuilds()}.
@author Karl Heinz Marbaise
NOTE: This class is not part of any public API
|
getAllBuilds
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/AllMavenBuilds.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/AllMavenBuilds.java
|
Apache-2.0
|
public JenkinsHttpConnection getClient() {
return client;
}
|
Get the HTTP client.
@return client
|
getClient
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/BaseModel.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/BaseModel.java
|
Apache-2.0
|
public BuildWithDetails details() throws IOException {
return client.get(url, BuildWithDetails.class);
}
|
@return The information from Jenkins. In cases the build has never run
{@link #BUILD_HAS_NEVER_RUN} will be returned.
@throws IOException in case of an error.
|
details
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Build.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Build.java
|
Apache-2.0
|
public TestReport getTestReport() throws IOException {
return client.get(this.getUrl() + "/testReport/?depth=1", TestReport.class);
}
|
This is to get the information about {@link TestReport}
for a Maven Job type.
@return {@link TestReport}
@throws IOException in case of an error.
|
getTestReport
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Build.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Build.java
|
Apache-2.0
|
public String getEditType() {
return editType;
}
|
Return the SCM operation.
@return the SCM operation, <code>add</code> or <code>edit</code> or <code>delete</code>
@see <a href="http://javadoc.jenkins.io/hudson/scm/EditType.html">EditType</a>
|
getEditType
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/BuildChangeSetPath.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/BuildChangeSetPath.java
|
Apache-2.0
|
public boolean isFolder() {
if (jobs != null) {
return true;
}
return false;
}
|
Determine if this FolderJob object is a valid folder or not.
(internally: if jobs list exists)
@return true if this job is a folder.
|
isFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
Apache-2.0
|
public Map<String, Job> getJobs() {
//FIXME: Check for null of jobs? Can that happen?
return jobs.stream()
.map(SET_CLIENT(this.client))
.collect(Collectors.toMap(Job::getName, Function.identity()));
}
|
Get a list of all the defined jobs in this folder
@return list of defined jobs (summary level, for details {@link Job#details()}.
|
getJobs
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
Apache-2.0
|
public Job getJob(String name) {
//FIXME: Check for null of jobs? Can that happen?
return jobs.stream()
.map(SET_CLIENT(this.client))
.filter(item -> item.getName().equals(name))
.findAny()
.orElseThrow(() -> new IllegalArgumentException("Job with name " + name + " does not exist."));
}
|
Get a job in this folder by name
@param name the name of the job.
@return the given job
@throws IllegalArgumentException in case if the {@code name} does not exist.
|
getJob
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
Apache-2.0
|
public FolderJob createFolder(String folderName) throws IOException {
return createFolder(folderName, false);
}
|
Create a folder on the server (as a subfolder of this folder)
@param folderName name of the folder to be created.
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
Apache-2.0
|
public FolderJob createFolder(String folderName, Boolean crumbFlag) throws IOException {
// https://gist.github.com/stuart-warren/7786892 was slightly helpful
// here
//TODO: JDK9+: Map.of(...)
Map<String, String> params = new HashMap<>();
params.put("mode", "com.cloudbees.hudson.plugins.folder.Folder");
params.put("name", folderName);
params.put("from", "");
params.put("Submit", "OK");
client.post_form(this.getUrl() + "/createItem?", params, crumbFlag);
return this;
}
|
Create a folder on the server (as a subfolder of this folder)
@param folderName name of the folder to be created.
@param crumbFlag true/false.
@return
@throws IOException in case of an error.
|
createFolder
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/FolderJob.java
|
Apache-2.0
|
public String getFileFromWorkspace(String fileName) throws IOException {
InputStream is = client.getFile(URI.create(url + "/ws/" + fileName));
ByteArrayOutputStream result = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int length;
while ((length = is.read(buffer)) != -1) {
result.write(buffer, 0, length);
}
return result.toString(StandardCharsets.UTF_8);
}
|
Get a file from workspace.
@param fileName The name of the file to download from workspace. You can
also access files which are in sub folders of the workspace.
@return The string which contains the content of the file.
@throws IOException in case of an error.
|
getFileFromWorkspace
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public QueueReference build() throws IOException {
ExtractHeader location = client.post(url + "build", null, ExtractHeader.class, false);
return new QueueReference(location.getLocation());
}
|
Trigger a build without parameters
@return {@link QueueReference} for further analysis of the queued build.
@throws IOException in case of an error.
|
build
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public QueueReference build(boolean crumbFlag) throws IOException {
ExtractHeader location = client.post(url + "build", null, ExtractHeader.class, crumbFlag);
return new QueueReference(location.getLocation());
}
|
Trigger a build with crumbFlag.
@param crumbFlag true or false.
@return {@link QueueReference} for further analysis of the queued build.
@throws IOException in case of an error.
|
build
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public QueueReference build(Map<String, String> params) throws IOException {
return build(params, null, false);
}
|
Trigger a parameterized build with string parameters only
@param params the job parameters
@return {@link QueueReference} for further analysis of the queued build.
@throws IOException in case of an error.
|
build
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public QueueReference build(Map<String, String> params, boolean crumbFlag) throws IOException {
return build(params, null, crumbFlag);
}
|
Trigger a parameterized build with string parameters only
@param params the job parameters
@param crumbFlag true or false.
@return {@link QueueReference} for further analysis of the queued build.
@throws IOException in case of an error.
|
build
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public QueueReference build(Map<String, String> params, Map<String, File> fileParams) throws IOException {
return build(params, fileParams, false);
}
|
Trigger a parameterized build with file parameters
@param params the job parameters
@param fileParams the job file parameters
@return {@link QueueReference} for further analysis of the queued build.
@throws IOException in case of an error.
|
build
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/Job.java
|
Apache-2.0
|
public Build getFirstBuild() {
if (firstBuild == null) {
return Build.BUILD_HAS_NEVER_RUN;
} else {
return buildWithClient(firstBuild);
}
}
|
@return the first build which has been executed or
{@link Build#BUILD_HAS_NEVER_RUN} if the build has never been
run.
|
getFirstBuild
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public boolean hasFirstBuildRun() {
return firstBuild != null;
}
|
Check if the {@link #firstBuild} has been run or not.
@return <code>true</code> if a build has been run <code>false</code>
otherwise.
|
hasFirstBuildRun
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public Build getLastBuild() {
if (lastBuild == null) {
return Build.BUILD_HAS_NEVER_RUN;
} else {
return buildWithClient(lastBuild);
}
}
|
@return The lastBuild. If {@link #lastBuild} has never been run
{@link Build#BUILD_HAS_NEVER_RUN} will be returned.
|
getLastBuild
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public boolean hasLastBuildRun() {
return lastBuild != null;
}
|
Check if the {@link #lastBuild} has been run or not.
@return <code>true</code> if the last build has been run
<code>false</code> otherwise.
|
hasLastBuildRun
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public Build getLastCompletedBuild() {
if (lastCompletedBuild == null) {
return Build.BUILD_HAS_NEVER_RUN;
} else {
return buildWithClient(lastCompletedBuild);
}
}
|
@return The lastCompletedBuild. If {@link #lastCompletedBuild} has never
been run {@link Build#BUILD_HAS_NEVER_RUN} will be returned.
|
getLastCompletedBuild
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public boolean hasLastCompletedBuildRun() {
return lastCompletedBuild != null;
}
|
Check if the {@link #lastCompletedBuild} has been run or not.
@return <code>true</code> if the last completed build has been run
<code>false</code> otherwise.
|
hasLastCompletedBuildRun
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public Build getLastFailedBuild() {
if (lastFailedBuild == null) {
return Build.BUILD_HAS_NEVER_RUN;
} else {
return buildWithClient(lastFailedBuild);
}
}
|
@return The lastFailedBuild. If {@link #lastFailedBuild} has never been
run {@link Build#BUILD_HAS_NEVER_RUN} will be returned.
|
getLastFailedBuild
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public boolean hasLastFailedBuildRun() {
return lastFailedBuild != null;
}
|
Check if the {@link #lastFailedBuild} has been run or not.
@return <code>true</code> if the last failed build has been run
<code>false</code> otherwise.
|
hasLastFailedBuildRun
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public Build getLastStableBuild() {
if (lastStableBuild == null) {
return Build.BUILD_HAS_NEVER_RUN;
} else {
return buildWithClient(lastStableBuild);
}
}
|
@return The lastStableBuild. If {@link #lastStableBuild} has never been
run {@link Build#BUILD_HAS_NEVER_RUN} will be returned.
|
getLastStableBuild
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
public boolean hasLastStableBuildRun() {
return lastStableBuild != null;
}
|
Check if the {@link #lastStableBuild} has been run or not.
@return <code>true</code> if the last stable build has been run
<code>false</code> otherwise.
|
hasLastStableBuildRun
|
java
|
ixrjog/opscloud4
|
opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
https://github.com/ixrjog/opscloud4/blob/master/opscloud-datasource-jenkins/src/main/java/com/baiyi/opscloud/datasource/jenkins/model/JobWithDetails.java
|
Apache-2.0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.