简体   繁体   English

了解詹金斯中的存档工件

[英]Understanding Archiving artifacts in jenkins

What I need to give Archiving artifacts field in Jenkins path jobs. 我需要在Jenkins路径作业中提供“归档工件”字段。 and I see each folder is created for each build which containing all artifact inside which is increasing the space on disk. 而且我看到为每个构建都创建了每个文件夹,其中包含内部所有构件,从而增加了磁盘空间。

What I need to do for this? 我需要为此做什么?

ERROR: No artifacts found that match the file pattern "ReviewWorkflow". Configuration error?
Build step 'Archive the artifacts' changed build result to FAILURE
An attempt to send an e-mail to empty list of recipients, ignored.
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Request made to compress build log
Failed to send e-mail to sgg7kor because no e-mail address is known, and no default e-mail domain is configured
Failed to send e-mail to sir7cob because no e-mail address is known, and no default e-mail domain is configured
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE

Based on the error message above, you do not have a file called, ReviewWorkFlow local to your job's workspace. 根据上面的错误消息,您在作业的工作区本地没有名为ReviewWorkFlow的文件。

From the help icon within the job configuration for archiving states, 在作业配置中用于归档状态的帮助图标中,


You can use wildcards like 'module/dist/**/*.zip'. 您可以使用'module / dist / ** / *。zip'之类的通配符。 See the includes attribute of Ant fileset for the exact format. 有关确切格式,请参见Ant文件集的include属性。 The base directory is the workspace. 基本目录是工作空间。 You can only archive files that are located in your workspace. 您只能归档工作空间中的文件。

It's important to make sure the file/directory you are archiving is within the job's workspace. 确保要归档的文件/目录在作业的工作空间内,这一点很重要。 To view the contents of a job's workspace you can, 要查看工作区的内容,您可以,

In the event, ReviewWorkFlow is a directory and you wish to archive the entire content of the directory, including sub-folders then you can use the wildcard character, 在这种情况下, ReviewWorkFlow是一个目录,并且您希望将目录的全部内容(包括子文件夹)存档,则可以使用通配符,

  • ReviewWorkFlow\\**\\* (copy ALL contents of ReviewWorkFlow and it's subdirectories) ReviewWorkFlow\\**\\* (复制ReviewWorkFlow及其子目录的所有内容)

If you build a Maven project (for example) which generates a war archive in the target folder, you must use this syntax to archive the war file: 例如,如果您构建一个在目标文件夹中生成战争存档的Maven项目,则必须使用以下语法来存档战争文件:

your_maven_module/target/my_module-*.war

This post command is running in your workspace root folder, no need to include the workspace path. 此发布命令正在您的工作空间根文件夹中运行,无需包含工作空间路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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