All Projects → cdancy → Jenkins Rest

cdancy / Jenkins Rest

Licence: apache-2.0
Java client, built on top of jclouds, for working with Jenkins REST API

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jenkins Rest

Flint
Fast and configurable filesystem (file and directory names) linter
Stars: ✭ 115 (-42.79%)
Mutual labels:  devops, ci, continuous-integration, cd
Lastbackend
System for containerized apps management. From build to scaling.
Stars: ✭ 1,536 (+664.18%)
Mutual labels:  devops, ci, continuous-integration, cd
Httpie
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie
Stars: ✭ 53,052 (+26294.03%)
Mutual labels:  rest-api, rest, devops, client
Orkestra
Functional DevOps with Scala and Kubernetes
Stars: ✭ 102 (-49.25%)
Mutual labels:  devops, ci, continuous-integration, cd
Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+7.96%)
Mutual labels:  devops, ci, continuous-integration, cd
Nvwa Io
Nvwa-io is a open source DevOps CI/CD auto-build and auto-deploy system(女娲 - 开源 DevOps CI/CD 自动构建和自动部署系统). http://nvwa-io.com
Stars: ✭ 283 (+40.8%)
Mutual labels:  devops, ci, jenkins, cd
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (-15.42%)
Mutual labels:  ci, continuous-integration, jenkins, cd
Jmeter Elasticsearch Backend Listener
JMeter plugin that lets you send sample results to an ElasticSearch engine to enable live monitoring of load tests.
Stars: ✭ 72 (-64.18%)
Mutual labels:  ci, continuous-integration, cd
Pipelines
Build pipelines for automation, deployment, testing...
Stars: ✭ 105 (-47.76%)
Mutual labels:  ci, continuous-integration, cd
Lumen Microservice
Lumen on Docker - Skeleton project with Nginx, MySQL & PHP 7 | Aws ECS, Google Kubernates, Azure Container Engine
Stars: ✭ 183 (-8.96%)
Mutual labels:  rest-api, rest, devops
Mirrorgate
MirrorGate DevOps Dashboard
Stars: ✭ 117 (-41.79%)
Mutual labels:  devops, ci, jenkins
Apicheck
The DevSecOps toolset for REST APIs
Stars: ✭ 184 (-8.46%)
Mutual labels:  rest-api, rest, devops
Env Ci
Get environment variables exposed by CI services
Stars: ✭ 180 (-10.45%)
Mutual labels:  ci, continuous-integration, jenkins
Flow Core X
Powerful and user-friendly CI / CD server with high availability, parallel build, agent scaling
Stars: ✭ 1,108 (+451.24%)
Mutual labels:  devops, ci, continuous-integration
Fluenttc
🌊 👬 🏢 Integrate with TeamCity fluently
Stars: ✭ 42 (-79.1%)
Mutual labels:  devops, ci, continuous-integration
Cimonitor
Displays CI statuses on a dashboard and triggers fun modules representing the status!
Stars: ✭ 34 (-83.08%)
Mutual labels:  ci, continuous-integration, cd
Ci Detector
Detect continuous integration environment and get information of current build
Stars: ✭ 138 (-31.34%)
Mutual labels:  ci, continuous-integration, jenkins
Kubectl
A Github action for kubectl, the Kubernetes CLI
Stars: ✭ 128 (-36.32%)
Mutual labels:  devops, ci, cd
Solo Ci
A lightweight CI/CD tool powered by Golang
Stars: ✭ 168 (-16.42%)
Mutual labels:  devops, ci, cd
Gocd
Main repository for GoCD - Continuous Delivery server
Stars: ✭ 6,314 (+3041.29%)
Mutual labels:  ci, continuous-integration, cd

Build Status codecov Download Stack Overflow

jenkins-rest

Java client is built on the top of jclouds for working with Jenkins REST API.

Setup

Client's can be built like so:

JenkinsClient client = JenkinsClient.builder()
.endPoint("http://127.0.0.1:8080") // Optional. Defaults to http://127.0.0.1:8080
.credentials("admin:password") // Optional.
.build();

SystemInfo systemInfo = client.api().systemApi().systemInfo();
assertTrue(systemInfo.jenkinsVersion().equals("1.642.4"));

Latest release

Can be found in jcenter like so:

<dependency>
  <groupId>com.cdancy</groupId>
  <artifactId>jenkins-rest</artifactId>
  <version>X.Y.Z</version>
  <classifier>sources|tests|javadoc|all</classifier> (Optional)
</dependency>

Documentation

Property based setup

Client instances do NOT need to supply the endPoint or credentials as a part of instantiating the JenkinsClient object. Instead one can supply them through system properties, environment variables, or a combination of the two. System properties will be searched first and if not found, will attempt to query the environment.

Setting the endpoint can be done with any of the following (searched in order):

  • jenkins.rest.endpoint
  • jenkinsRestEndpoint
  • JENKINS_REST_ENDPOINT

Setting the credentials can be done with any of the following (searched in order):

  • jenkins.rest.credentials
  • jenkinsRestCredentials
  • JENKINS_REST_CREDENTIALS

Credentials

jenkins-rest credentials can take 1 of 2 forms:

  • Colon delimited username and password: admin:password
  • Base64 encoded username and password: YWRtaW46cGFzc3dvcmQ=

Examples

The mock and live tests provide many examples that you can use in your own code.

Components

  • jclouds - used as the backend for communicating with Jenkins REST API
  • AutoValue - used to create immutable value types both to and from the jenkins program

Testing

Running mock tests can be done like so:

./gradlew clean build mockTest

Running integration tests can be done like so (requires existing jenkins instance):

./gradlew clean build integTest 

Integration tests settings

Jenkins instance requirements

This project provides instructions to setup a pre-configured Docker container

Integration tests configuration

  • jenkins url and authentication method used by the tests are defined in the gradle.properties file
  • by default, tests use the credentials authentication but this can be changed to use the token authentication

Running integration tests from within your IDE

  • the integTest gradle tasks set various System Properties
  • if you don't want to use gradle as tests runner in your IDE, configure the tests with the same kind of System Properties

Additional Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].