jenkinsci / jenkinsci/java-client-api

JobWithDetails.getAllBuilds() throws Exception with 404

オープン
#490 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Java
スター
913
フォーク
466
PR マージ指標
30日以内にマージされた PR はありません

説明

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();
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。