Get URL of build details page of another build

15 views
Skip to first unread message

Ullrich Hafner

unread,
Aug 4, 2021, 1:13:24 PM8/4/21
to JenkinsCI Developers
In Jenkins side panel we have a „previous build“ link that opens the same view for the previous build. Is this functionality available as API somewhere? I would like to navigate from the current view (e.g. the static analysis warnings for a given package) to the same view just in another build.

So my view is at
- http://localhost:8080/job/pipeline-analysis-model/157/spotbugs/fileName.1674206610/
From there I would like to open
- http://localhost:8080/job/pipeline-analysis-model/[build]/spotbugs/fileName.1674206610/

Of course I can parse the absolute URL on my own, but it would be simpler if I can reuse some functionality in core if available (based on relative paths).

Daniel Beck

unread,
Aug 4, 2021, 1:21:41 PM8/4/21
to JenkinsCI Developers
On Wed, Aug 4, 2021 at 7:13 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
Of course I can parse the absolute URL on my own, but it would be simpler if I can reuse some functionality in core if available (based on relative paths).

Ullrich Hafner

unread,
Aug 5, 2021, 1:27:31 PM8/5/21
to JenkinsCI Developers
Thanks for the pointer! The most important method is private. Without getUrl one can open only the previous and next build, but not an arbitrary build (e.g. the selected item in the build trend chart). 

Any objections on changing it to public? Then I will create a PR for it. In the meantime I will need to copy the code into my plugin. 
   

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAMo7Pt%2BgE185npgdu-U-n9%2BfV0Nr1PqBEm12jzNRneT9eaAf2Q%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages