org.jboss.aerogear:digger-java-client

Java client for AeroGear Digger

License

License

Categories

Categories

Java Languages JBoss Container Application Servers CLI User Interface
GroupId

GroupId

org.jboss.aerogear
ArtifactId

ArtifactId

digger-java-client
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

Java client for AeroGear Digger
Project URL

Project URL

https://aerogear.org/
Project Organization

Project Organization

JBoss by Red Hat
Source Code Management

Source Code Management

https://github.com/aerogear/digger-java

Download digger-java-client

How to add to project

<!-- https://jarcasting.com/artifacts/org.jboss.aerogear/digger-java-client/ -->
<dependency>
    <groupId>org.jboss.aerogear</groupId>
    <artifactId>digger-java-client</artifactId>
    <version>1.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.jboss.aerogear/digger-java-client/
implementation 'org.jboss.aerogear:digger-java-client:1.1.3'
// https://jarcasting.com/artifacts/org.jboss.aerogear/digger-java-client/
implementation ("org.jboss.aerogear:digger-java-client:1.1.3")
'org.jboss.aerogear:digger-java-client:jar:1.1.3'
<dependency org="org.jboss.aerogear" name="digger-java-client" rev="1.1.3">
  <artifact name="digger-java-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.jboss.aerogear', module='digger-java-client', version='1.1.3')
)
libraryDependencies += "org.jboss.aerogear" % "digger-java-client" % "1.1.3"
[org.jboss.aerogear/digger-java-client "1.1.3"]

Dependencies

compile (5)

Group / Artifact Type Version
org.jboss.aerogear : jenkins-client jar 0.3.8
org.jtwig : jtwig-core jar 5.65
org.slf4j : slf4j-api jar 1.7.21
org.slf4j : slf4j-log4j12 jar 1.7.21
org.apache.commons : commons-collections4 jar 4.0

test (4)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-core jar 1.9.5
org.assertj : assertj-core jar 3.6.1
com.google.guava : guava jar 17.0

Project Modules

There are no modules declared in this project.

Digger Java client

Build Status License

A java integration library for AeroGear Digger

Project Info

Project Info
License: Apache License, Version 2.0
Build: Maven
Documentation: https://github.com/aerogear/aerogear-digger-java-client
Issue tracker: https://issues.jboss.org/browse/AGDIGGER
Mailing lists: aerogear-users (subscribe)
aerogear-dev (subscribe)
IRC: #aerogear channel in the freenode network.

Getting started

For now, clone the repository and run the build:

mvn clean install

Add the following dependencies to your pom.xml file:

<dependency>
    <groupId>org.jboss.aerogear</groupId>
    <artifactId>digger-java-client</artifactId>
    <version>1.1.0</version>
</dependency>

Usage

Build a default client:

   DiggerClient client = DiggerClient.createDefaultWithAuth("https://digger.com", "admin", "password");

Build a customized client:

   DiggerClient client = DiggerClient.builder()
         .jobService(new JobService())
         .buildService(new BuildService(10000, 100))
         .artifactsService(artifactsService)
         .withAuth("https://digger.com", "admin", "password")
         .build();

Create job:

  client.createJob("java-client-job1","https://github.com/wtrocki/helloworld-android-gradle","master");

The client supports setting clean-up values for jobs in relation to the number of days to store builds and artifacts and the total number of builds and artifacts to keep.

Create a job with clean-up policy:

import org.aerogear.digger.client.model.BuildDiscarder

BuildDiscarder buildDiscarder = new BuildDiscarder();
buildDiscarder.setStoreBuildsDays(7)
client.createJob("java-client-job1","https://github.com/wtrocki/helloworld-android-gradle","master", buildDiscarder);

The client supports passing a list of build parameters. To create a job with build params:

import org.aerogear.digger.client.model.BuildParameter;

public static final BuildParameter EXAMPLE = new BuildParameter(EXAMPLE)
   .setDescription("Branch of project to checkout and build.")
   .setDefaultValue("master");

private List<BuildParameter> params = Lists.newArrayList(EXAMPLE)

client.createJob("java-client-job1","https://github.com/wtrocki/helloworld-android-gradle","master", params);

Trigger a job:

  BuildStatus buildStatus = client.build("java-client-job1");

Get build logs:

  int buildNumber = 4;
  String logs = client.getBuildLogs("java-client-job1", buildNumber);

Save artifacts to file

  int buildNumber = 4;
  String artifactName="*.apk" 
  File outputFile = ...
  client.saveArtifact("java-client-job1", buildNumber,artifactName, outputFile);

Requirements

Client works with Java6 and above.

Building

mvn clean package

org.jboss.aerogear

AeroGear

Modern App Dev begins here - RealTime GraphQL and Push

Versions

Version
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1