jenkinsci / jenkinsci/java-client-api

JobWithDetails.getAllBuilds() throws Exception with 404

Abierto
#490 2 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Java
Estrellas
913
Forks
466
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

My job has many builds, but I got null when call `jenkinsServer.getJob("Folder1/Folder2/jobName").getAllBuilds()`.

Then I check the source code, and find:
```
List builds = client.get(path + "job/" + EncodingUtils.encode(this.getName())
+ "?tree=allBuilds[number[*],url[*],queueId[*]]", AllBuilds.class).getAllBuilds();
```
The problem is `this.getName()`. My job's full path is :
`/job/Folder1/job/Folder2/job/jobName`

But this.getName() only returns jobName.

So I can get correct results with this:
```
List builds = client.get("/job/Folder1/job/Folder2/job/jobName"
+ "?tree=allBuilds[number[*],url[*],queueId[*]]", AllBuilds.class).getAllBuilds();
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.