竹子不想创建工件。

10

使用Bamboo构建时,我们创建了文件/var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release/dev_patch_release.tar.bz2。这个文件已经存在,在命令行中进行了检查。

在“工件定义”中,我有以下模式:**/release/*.bz2

但不幸的是,在构建完成后,在Bamboo->构建->工件中,未找到此构建结果的工件。

与此同时,我还有单元测试结果在**/extra/build/logs/*.xml处,这些结果被JUnit成功解析。

所以,我还创建了另一个带有**/extra/build/logs/*.xml的工件模式-尽管Bamboo看不到它,但JUnit可以解析它。

如何使用Bamboo创建名为dev_patch_release.tar.bz2的工件?

Bamboo构建日志:

simple      08-May-2014 23:11:33    Build Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17) started building on agent Agent2
simple  08-May-2014 23:11:33    Build working directory is /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD
simple  08-May-2014 23:11:33    Executing build Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17)
simple  08-May-2014 23:11:33    Starting task 'Source Code Checkout' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.checkout'    simple  08-May-2014 23:11:33    Updating source code to revision: c100a20080b08f79b6d1f566dc55a1f5154ff069
simple  08-May-2014 23:11:37    Updated source code to revision: c100a20080b08f79b6d1f566dc55a1f5154ff069
simple  08-May-2014 23:11:37    Finished task 'Source Code Checkout'
simple  08-May-2014 23:11:37    Running pre-build action: Clover Grails PreBuild Action
simple  08-May-2014 23:11:37    Running pre-build action: VCS Version Collector
command 08-May-2014 23:11:37    Substituting variable: ${bamboo.build.working.directory} with /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD    command 08-May-2014 23:11:37    Substituting variable: ${bamboo.buildResultKey} with T4-TGDP-RD-17
command 08-May-2014 23:11:37    Substituting variable: ${bamboo.repository.revision.number} with c100a20080b08f79b6d1f566dc55a1f5154ff069
simple  08-May-2014 23:11:37    Starting task 'Run Phing' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.command'
command 08-May-2014 23:11:37    Beginning to execute external process for build 'Dev Patch - Release and Deploy #17 (T4-TGDP-RD-17)'\n ... running command line: \n/usr/bin/phing -buildfile /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/bamboo-dev-patch.xml test\n ... in: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD\n ... using extra environment variables: \nrevision=c100a20080b08f79b6d1f566dc55a1f5154ff069\nbuild_result_key=T4-TGDP-RD-17\n
build   08-May-2014 23:11:39    [00;36mBuildfile: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/bamboo-dev-patch.xml[0m
build   08-May-2014 23:11:39    [00;32m
build   08-May-2014 23:11:39    Dev Patch Build Plan > prepare:
build   08-May-2014 23:11:39    [0m
build   08-May-2014 23:11:39    [00;36m    [mkdir] Created dir: /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release[0m
build   08-May-2014 23:12:05    Dev Patch Build Plan > test:
build   08-May-2014 23:12:05    [0m
build   08-May-2014 23:12:05    [00;36m     [echo] tar cfj /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release/dev_patch_release.tar.bz2 ./[0m
build   08-May-2014 23:12:48    [00;32m
build   08-May-2014 23:12:48    BUILD FINISHED
build   08-May-2014 23:12:48    
build   08-May-2014 23:12:48    Total time: 1 minutes  9.67 seconds
build   08-May-2014 23:12:48    [0m
simple  08-May-2014 23:12:48    Finished task 'Run Phing'
simple  08-May-2014 23:12:48    Running post build plugin 'NCover Results Collector'
simple  08-May-2014 23:12:48    Running post build plugin 'Clover Results Collector'
simple  08-May-2014 23:12:48    Finalising the build...
simple  08-May-2014 23:12:48    Stopping timer.
simple  08-May-2014 23:12:48    Build T4-TGDP-RD-17 completed.
simple  08-May-2014 23:12:48    Running on server: post build plugin 'NCover Results Collector'
simple  08-May-2014 23:12:48    Running on server: post build plugin 'Clover Delta Calculator'
simple  08-May-2014 23:12:48    All post build plugins have finished
simple  08-May-2014 23:12:48    Generating build results summary...
simple  08-May-2014 23:12:48    Saving build results to disk...
simple  08-May-2014 23:12:48    Indexing build results...
simple  08-May-2014 23:12:48    Finished building T4-TGDP-RD-17.

你的bamboo根文件夾是/var/atlassian/bamboo嗎? - tmlai
/var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD - 构建工作目录。是的,/var/atlassian/bamboo/ 是Bamboo的根文件夹。 - Pavlo Voznenko
1
构建日志很有趣。我没有看到它运行了Artifact复制器后构建插件。这是我的构建日志示例:simple 06-May-2014 11:07:00 运行后构建插件'Artifact Copier' simple 06-May-2014 11:07:00 发布一个工件:全部我不认为有禁用全局创建工件的选项。您使用的Bamboo版本是什么? - tmlai
2
感谢您的帮助,这是Bamboo上的一个错误:https://jira.atlassian.com/browse/BAM-14585 - Pavlo Voznenko
2个回答

6
在构件定义界面中:
对于“位置”,请指定要创建构件的文件的相对路径。 对于“复制模式”,请指定要复制的模式。
对于您的情况,请将“./release”放入“位置”框中,然后将“*.bz2”指定为复制模式。
有关更多信息,请参见此问题:https://jira.atlassian.com/browse/BAM-2149

1
你好,感谢您的回答,但很遗憾并没有帮助到我。我有一种感觉,您可以在全局层面上关闭构件创建,这就是为什么它无法工作的原因。我已经将Bamboo构建日志附加到问题描述中,也许它能够提供帮助。 - Pavlo Voznenko
1
是的,在我解决了发布工件的问题之后,你的解决方案就可以正常工作了。谢谢! - Pavlo Voznenko

1
CW答案从问题迁移:

由于错误“关闭正在运行的构建时,Bamboo会导致插件(即Artifact copier plugin)停用”(https://jira.atlassian.com/browse/BAM-14585),Bamboo的系统插件“System Builders”可能会被禁用,因此它停止发布工件。在错误的评论中,您可以找到解决方案:
  1. 进入管理 -> 管理插件
  2. 从筛选器下拉列表中选择“系统”
  3. 找到插件“System Builders”
  4. 启用它!
我的Bamboo版本仍然出现错误:5.4.1 build 4207 - 12 Feb 14。 Atlassian将很快发布补丁来解决此问题。 相关问题请参阅Atlassian答案网站:https://answers.atlassian.com/questions/292548/bamboo-does-not-want-to-create-artifacts

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接