Jenkins Client

Light-weight Jenkins REST API Client for Java

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

io.github.kev1nst
Идентификатор

Идентификатор

jenclight
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Jenkins Client
Light-weight Jenkins REST API Client for Java
Ссылка на сайт

Ссылка на сайт

https://github.com/kev1nst/jenkins-client
Система контроля версий

Система контроля версий

https://github.com/kev1nst/jenkins-client

Скачать jenclight

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.github.kev1nst/jenclight/ -->
<dependency>
    <groupId>io.github.kev1nst</groupId>
    <artifactId>jenclight</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.kev1nst/jenclight/
implementation 'io.github.kev1nst:jenclight:1.0.0'
// https://jarcasting.com/artifacts/io.github.kev1nst/jenclight/
implementation ("io.github.kev1nst:jenclight:1.0.0")
'io.github.kev1nst:jenclight:jar:1.0.0'
<dependency org="io.github.kev1nst" name="jenclight" rev="1.0.0">
  <artifact name="jenclight" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.kev1nst', module='jenclight', version='1.0.0')
)
libraryDependencies += "io.github.kev1nst" % "jenclight" % "1.0.0"
[io.github.kev1nst/jenclight "1.0.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.nutz : nutz jar 1.r.67

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12

Модули Проекта

Данный проект не имеет модулей.

Jenkins-REST

Light-weight Jenkins REST API Client for Java

no more classpath conflicts !!


After googling for a few days I found it hard to get a jenkins rest api client for java without a dozen of dependencies, the offical client com.offbytwo.jenkins caused me lots of classpath conflicts with aws sdk, kafka java sdk etc. Most of them are around common utility libs like jackson. To fix these classpath conflicts, Instead of rewriting another aws sdk or kafka sdk which is obviously too much to complete, jenkins seems to be the easy answer. Here comes this light weight jenkins rest api client, currently it supports:

  • basic http authentication with account username, password/api-token
  • build job with or without parameters
  • customizable jenkins log handler ( register callback method which will trigger when log entry is retrieved )
  • customizable jenkins job progress handler ( register callback method which will trigger when certain job lifecycle event is reached )
  • job timeout config (throw exception after timeout)
  • synchronized await until job complete

Quick Start

update your build.gradle, add the following dependency:

compile group: 'io.github.kev1nst', name: 'jenkins-rest', version: '1.0.1'

Then in your Java code, simplely add the following:

JobResult result=Jenkins.connect(JENKINS_URL, ACCOUNT, CREDENTIAL).build("folder1/job1").await();
// then start to write whatever code you want to execute after the job is completed

the Demo class in the source code provides most of the common use cases of how-to

Версии библиотеки

Версия
1.0.0