在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jenkinsci/java-client-api开源软件地址:https://github.com/jenkinsci/java-client-api开源编程语言:Java 99.8%开源软件介绍:A Jenkins API Client for JavaImportant NoteThe Jenkins API Client For Java has now moved under the umbrella of the Jenkins GitHub Organization. What is the "Jenkins API Client for Java"?This library is just a piece of java code which uses the REST API of jenkins. This means you can trigger builds, extract informations about jobs or builds etc. The information you can extract will be represented in java objects which you can reuse for other purposes or integrate this library into other parts for a higher level of integration. Getting StartedIf you like to use this library you need to add the library as a dependency to your project. This can be done by using a Maven dependency like the following: <dependency>
<groupId>com.offbytwo.jenkins</groupId>
<artifactId>jenkins-client</artifactId>
<version>0.3.8</version>
</dependency> This can also being done by defining a Gradle dependency like this:
Starting with a future release 0.4.0 the groupId/artifactId will change (NOT YET DONE!) <dependency>
NOT YET FINALIZED NOR RELEASED !!!
<groupId>org.jenkins-ci.lib</groupId>
<artifactId>java-client-api</artifactId>
<version>0.4.0</version>
</dependency> UsageThe JenkinsServer jenkins = new JenkinsServer(new URI("http://localhost:8080/jenkins"), "admin", "password") At the top level you can access all of the currently defined jobs. This returns a map of job names (in lower case) to jobs. Map<String, Job> jobs = jenkins.getJobs() The Job class provides only summary information (name and url). You can retrieve details as follows JobWithDetails job = jobs.get("My Job").details() The Running TestsTo run only unit tests without invoking the integration tests use the following command:
Running Integration TestsTo run integration tests simply start
There is also a module which contains integration tests which are running with a special version of Jenkins within a Docker container to check several aspects of the API which can't be covered by the usual integration tests. Release NotesYou can find details about the different releases in the Release Notes.
ContributionCreating IssuesIf you find a problem please create an
issue in the ticket system with the component Creating a Pull RequestBefore you create a pull request it is necessary to create an issue in
the ticket system before with the component It is required if you want to get a Pull request to be integrated into please squash your commits into a single commit which references the issue in the commit message which looks like this:
This makes it simpler to merge it and this will also close the appropriate issue automatically in one go. This make the life as maintainer a little bit easier. A pull request has to fulfill only a single ticket and should never create/add/fix several issues in one, cause otherwise the history is hard to read and to understand and makes the maintenance of the issues and pull request hard or to be honest impossible. Furthermore it is necessary to create appropriate entries into the Help & QuestionsYou can ask questions in the mailing list which is also intended as discussion forum for development. Generated Sitehttp://jenkinsci.github.io/java-client-api/ LicenseCopyright (C) 2013, Cosmin Stejerean, Karl Heinz Marbaise, and contributors. Distributed under the MIT license: http://opensource.org/licenses/MIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论