Bamboo 不想创建 Artifacts

Posted

技术标签:

【中文标题】Bamboo 不想创建 Artifacts【英文标题】:Bamboo does not want to create Artifacts 【发布时间】:2014-05-08 14:35:52 【问题描述】:

在使用 Bamboo 构建期间,我们创建文件 /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD/release/dev_patch_release.tar.bz2。该文件存在,用命令行检查。

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

但不幸的是,构建完成后,在 Bamboo -> Build -> Artifact No artifacts have been found for this build result..

同时,我在**/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.

【问题讨论】:

是/var/atlassian/bamboo/你的竹根文件夹吗? /var/atlassian/bamboo/xml-data/build-dir/T4-TGDP-RD - 构建工作目录。是的,/var/atlassian/bamboo/ 这是竹子的根文件夹。 构建日志很有趣。我没有看到它运行 Artifact copier post build 插件。这是我的构建日志的一个示例:simple 06-May-2014 11:07:00 Running post build plugin 'Artifact Copier' simple 06-May-2014 11:07:00 Publishing an artifact: All 我认为没有这样的选项可以禁用全局创建工件。您使用的是哪个版本的 Bamboo? 感谢帮助,这是 Bamboo 的一个错误:jira.atlassian.com/browse/BAM-14585 【参考方案1】:

在工件定义屏幕中:

对于Location,指定要创建工件的文件的相对路径 对于Copy pattern,指定要复制的模式。

对于您的情况,将./release 放入位置框中,然后指定*.bz2 作为复制模式。

更多信息,请参阅本期https://jira.atlassian.com/browse/BAM-2149

【讨论】:

您好,感谢您的回答,很遗憾它没有帮助。我觉得你可以在全球范围内关闭 Artefact 创建,这就是它不起作用的原因。我将 Bamboo 构建日志附加到问题的描述中,也许它会有所帮助。 是的,在我解决了发布 Artifacts 的问题后,您的解决方案正在运行。谢谢!【参考方案2】:

CW 答案从问题迁移而来:

由于错误Shutting down Bamboo while builds are still running causes plugins (i.e. Artifact copier plugin) disabling (https://jira.atlassian.com/browse/BAM-14585) Bamboo 的系统插件 “系统构建器”可以被禁用,因此它停止发布工件。

在cmets中可以找到解决方案:

    转到管理 -> 管理加载项 从过滤器下拉菜单中选择“系统” 找到插件“System Builders” 启用它!

我的 Bamboo 版本仍然出现 bug:5.4.1 build 4207 - 12 Feb 14

Atlassian 答案网站上的相关问题: https://answers.atlassian.com/questions/292548/bamboo-does-not-want-to-create-artifacts

Atlassian 将很快发布补丁来解决这个问题。

【讨论】:

以上是关于Bamboo 不想创建 Artifacts的主要内容,如果未能解决你的问题,请参考以下文章

将 Atlassian Bamboo 用于 .Net 项目的 CI

A1-2017级算法上机第一次练习赛 N Bamboo的饼干

Bamboo - 创建新分支时自动创建部署触发器

Bamboo 中的 REST 端点创建计划?

在 JIRA Studio 中为 Bamboo 创建 Windows AMI 以进行构建

Bamboo:创建拉取请求时创建“计划分支”,但按目标分支过滤