简体   繁体   中英

Jenkins: How to show last build (not only last successful build) artifacts on job main page?

By default jenkins shows the "last successful artifacts" on the jobs main page. This is ok most of the time. And I know how to configure the jobs to also store the artifacts in case of build failure.

But: In case of build failure the link to the artifacts of the failed build is only displayed as "build artifacts" on the build page of the job - not on the main page of the job. On the main page of the job there are still linked the "last successful artifacts" which come from an older build.

So what quite often happens: The developer gets the failure mail from jenkins, opens the job in jenkins and sees the jobs main page with the older successful artifacts. Because he does not realize this, he opens eg the dependency-check report to take a look at the error details - and wonders why there are no errors. This is sometimes quite confusing. The job reports an error, but the developer cannot see it - just because he opened the relevant artifact not from the failed build but from the last successful build .

So to make a long story short: How can I change the jobs main page to show not only the last successful artifacts but also always the artifacts of the last build - even if this was not successful. It should be the same link as on the jobs build page.

You can use Sidebar Link to add any link to the job's main page.

Provide the URL of the last build's artifacts, an appropriate name and image:
URL - http://JENKINS_SERVER_IP:8080/job/JOB_NAME/lastBuild/artifact
Text - Last Build Artifacts
Icon - /images/24x24/package.png

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM