无法让构建工件在 Jenkins/Hudson 中正确显示

发布于 2025-01-03 03:50:41 字数 293 浏览 1 评论 0原文

我目前使用 Jenkins 作为我的持续集成系统,并使用 Gradle 来构建我的项目。在不更改任何内容的情况下,Gradle 默认将所有构建工件放在工作区的 /build 文件夹下。这显然不能很好地工作,因为构建工件会被以下构建覆盖。

我修改了我的脚本以输出 Jenkins 上 /builds/[BUILD_ID] 文件夹中的文件,这将构建工件放入 CI 系统上正确的构建文件夹中,但当您导航时它们不会显示在 Jenkins gui 中到特定的构建。

如何让我的构建工件在 Jenkins 中显示?它们需要放在哪里才能在每个构建中显示?

I currently Jenkins to as my continuous integration system and I use Gradle to build my project. Without changing anything Gradle by default puts all the build artifacts under the /build folder in the workspace. This obviously doesn't work well since the build artifacts get overwritten by the following build.

I have modified my script to output the files in the /builds/[BUILD_ID] folder on Jenkins, which puts the build artifacts in the correct build folder on the CI system, but they don't show up in the Jenkins gui when you navigate to a specific build.

How do I get my build artifacts to display in Jenkins? Where do they need to be put, in order to show up for each build?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

云朵有点甜 2025-01-10 03:50:41

在 Jenkins 作业配置的“构建后操作”部分中,选择“归档工件”并指定要归档的文件。 Jenkins 将把它们与其余的构建数据一起保存,并在构建页面上提供每个文件的链接。

In the Post Build Actions section of your Jenkins job configuration, select "Archive the artifacts" and specify which files to archive. Jenkins will save them with the rest of the build data and provide links to each file on the build page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文