jenkinsci / jenkinsci/java-client-api

Getting Build from QueueReference

Open
#317 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
913
Forks
466
PR merge metrics
No merged PRs in 30d

Description

Hi All¡
First of all sorru for my ignorance, I´m new dealing with jenkins-api. I´m going to explain my doubt:

I have a process that call jenkins in order to launch a build:

` JenkinsServer jenkins = new JenkinsServer(new URI(
"https://jenkins"), "xxxxx",
"xxxxx");
Map params = new HashedMap();
params.put("svnPath","xxxxxx@44117");

QueueReference queue = jenkins.getJob("JARGENERATION").build(params);`

Now I´ve to fetch the artifact and I´m trying to get it by:

`QueueItem item = jenkins.getQueueItem(queue);
BuildWithDetails build = jenkins.getBuild(item).details();`

I guest that the problem is that the build is in process, but by debugging always get NullPointer inside the API.

Some workround of how to fetch the artifact from a build recently launched?

Thanks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.