/gocd-java-client

JAVA Client for GoCD API

Primary LanguageJava

Build Status

gocd-java-client

Maven Central

Attempt at building a Java client for programmatically accessing GoCD. Specifically built for using in GoCD plugins, which needs to access certain information from the server.

Usage

GoCD client = new GoCD("http://localhost", "admin", "badger");
// from v19.2.0 GoCD Server onwards
GoCD client = new GoCD("http://localhost", new BearerTokenAuthentication("PERSONAL_ACCESS_TOKEN"));
Map<Integer, PipelineRunStatus> statusMap = client.pipelineRunStatus("Build-Linux");

Note: You need at least JDK 9 to use this library, but it is built and tested against JDK 11.

Credits

Up to 0.0.7, most of this is based on the work done at gocd-janitor and gocd-slack-build-notifier. Credit goes to all those who have contributed to the respective projects.

License

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0