存档hudson / jenkins中的工件 [英] Archive the artifacts in hudson/jenkins

查看:298
本文介绍了存档hudson / jenkins中的工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以在构建过程中向我解释工件的想法吗?

Could someone please explain to me the idea of artifacts in the build process?

我有工作区目录,代码,编译和运行我的蚂蚁脚本等
到底,在我的case,我得到一个jar文件,准备安装。这是否被认为是工件?

I have the workspace directory where I check out the code to, compile, and run my ant scripts etc. At the end, in my case, I get a jar file thats ready to install. Is that considered to be the artifact?

我应该在哪里告诉我的构建脚本来放置jar文件?在工作区目录中?我的jar文件取决于变量,如 BUILD_ID 等等,我怎么能告诉Jenkins哪个jar文件选择一个唯一的文件名?

Where should I tell my build script to put the jar file? In the workspace directory? My jar file gets a unique filename depending on variables like BUILD_ID and such, how can I tell Jenkins which jar file to pick?

我有点困惑 - 谁能解释?

I am a little confused here – who can explain?

编辑:
好​​吧,所以我试着做这样的事情:

Okay, so i try to do something like this:

路径在我的工作区中还不存在,因为ant脚本假定要创建它,当然, .jar .properties 文件不在那里,因为它们还没有生成。为什么它给我一个错误呢?似乎我失去了一些东西。

The path does not exist yet in my workspace, because the ant script is suppose to create it, and of course, the .jar and .properties files are not there because they haven't been generated yet. why does it give me an error then? seems like i'm missing something.

此外,Jenkins在每次构建之后删除工件吗? (不是存档的工件,我知道我可以告诉它删除那些)否则会很快地阻塞硬盘驱动器。

Also, does Jenkins delete the artifacts after each build? (not the archived artifacts, I know I can tell it to delete those) Otherwise it will clog the hard drive pretty quickly.

推荐答案

你的理解是正确的,Jenkins意义上的一个工件是构建的结果 - 构建过程的预期输出。

Your understanding is correct, an artifact in the Jenkins sense is the result of a build - the intended output of the build process.

一个常见的惯例是将结果构建到构建目标 bin 目录。

A common convention is to put the result of a build into a build, target or bin directory.

Jenkins档案管理员可以使用globs( target / *。jar )轻松取得正确的档案你每个构建有一个唯一的名称。

The Jenkins archiver can use globs (target/*.jar) to easily pick up the right file even if you have a unique name per build.

这篇关于存档hudson / jenkins中的工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆