jenkinsci / jenkinsci/java-client-api
Unable to fetch build details
- Lenguaje dominante
- Java
- Estrellas
- 913
- Forks
- 466
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi ! I'm currently working with Jenkins (v2.65). I want to get details from builds but I'm unable to do so. Here a sample of my code (Some checks are skipped).
Map jobs = null;
JobWithDetails jobWithDetails;
jobs = Config.jenkins.getJobs();
for (Map.Entry entry : jobs.entrySet()) {
jobWithDetails = Config.jenkins.getJob(entry.getKey());
if (jobWithDetails != null) {
List list = null;
BuildWithDetails buildWithDetails = null;
list = jobWithDetails.getAllBuilds();
for (Build build : list) {
Build tmp_b = jobWithDetails.getBuildByNumber(build.getNumber());
buildWithDetails = tmp_b.details();
if (buildWithDetails != null)
// Do something....
else
System.out.println("Cannot retrieved 'BuildWithDetails'.");
}
}
}
> `Config.jenkins` is nothing more than a `JenkinsServer` instance.
I do mostly the same as @khmarbaise on issue #138 but `buildWithDetails` keep being equal to null.
Here a screenshot to illustrate :

Notice that I have to use `jobWithDetails = Config.jenkins.getJob(entry.getKey());` to get a valid `JobWithDetail` instance.
Guía de contribución
Línea de trabajo
Start by reproducing the example with Jenkins 2.65, then trace JenkinsServer.getJob, JobWithDetails.getAllBuilds, getBuildByNumber, and Build.details. Compare the behavior with issue #138 and determine why Build.details returns null; done means build details can be retrieved or the limitation is clearly documented.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- api
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100