使用 Bamboo 配置构建作业(CI 平台)

发布于 2024-10-21 04:49:01 字数 3790 浏览 6 评论 0原文

我有一个 Bamboo 实例设置来使用以下配置进行构建:

  1. Bamboo version = 3.0.1
  2. 运行构建时,我收到以下错误:
09-Mar-2011 08:57:50    Pulling from repository `/root/POC/PRS' to directory '/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99'
09-Mar-2011 08:57:50    pulling from /root/POC/PRAEFECTUS
09-Mar-2011 08:57:50    searching for changes
09-Mar-2011 08:57:50    no changes found
09-Mar-2011 08:57:50    Copying repository from cache directory to source directory...
09-Mar-2011 08:57:50    Creating empty repository in directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:50    Pulling from repository `/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99' to directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:51    pulling from /root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99
09-Mar-2011 08:57:51    requesting all changes
09-Mar-2011 08:57:51    adding changesets
09-Mar-2011 08:57:51    adding manifests
09-Mar-2011 08:57:51    adding file changes
09-Mar-2011 08:57:51    added 1 changesets with 810 changes to 810 files
09-Mar-2011 08:57:51    (run 'hg update' to get a working copy)
09-Mar-2011 08:57:52    810 files updated, 0 files merged, 0 files removed, 0 files unresolved
09-Mar-2011 08:57:52    Updated source code to revision: cc40b2d9c09ea747529887dd8db9319f53c5db4e
09-Mar-2011 08:57:52    Executing build PRQA-PRQAKEY-JOB1-2
09-Mar-2011 08:57:52    Running pre-build action: Build Number Stamper
09-Mar-2011 08:57:52    Running pre-build action: Clover Grails PreBuild Action
09-Mar-2011 08:57:52    Running pre-build action: VCS Version Collector
09-Mar-2011 08:57:52    Running pre-build action: Repository Isolation Enabler Action
09-Mar-2011 08:57:52    Running pre-build action: Maven Settings Prebuild Action
09-Mar-2011 08:57:52    Building started with ScriptBuilder
09-Mar-2011 08:57:52    
Starting to build 'PRAEFECTUS-QA - PRQA-PLAN - Default Job'
... running command line: /bin/sh Makefile
... in : /root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1
09-Mar-2011 08:57:52    Makefile: 10: PYTHON: not found

但是如果我们查看错误中列出的文件夹,Makefile 是否有

root@bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1# ls -l
total 104
-rw-r--r-- 1 root root   45 2011-03-09 08:57 AUTHORS
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 bin
-rw-r--r-- 1 root root  138 2011-03-09 08:57 build-number.txt
-rw-r--r-- 1 root root  120 2011-03-09 08:57 CHANGES
-rwxr-xr-x 1 root root 9703 2011-03-09 08:57 ez_setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 images
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 init.d
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 iped
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 logrotate.d
-rw-r--r-- 1 root root  932 2011-03-09 08:57 Makefile
-rw-r--r-- 1 root root  175 2011-03-09 08:57 MANIFEST.in
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 nbproject
-rw-r--r-- 1 root root 1109 2011-03-09 08:57 NEWS
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 prs
drwxr-xr-x 3 root root 4096 2011-03-09 08:57 rpa
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 sbin
drwxr-xr-x 4 root root 4096 2011-03-09 08:57 scripts
-rw-r--r-- 1 root root   81 2011-03-09 08:57 setup.cfg
-rwxr-xr-x 1 root root 2796 2011-03-09 08:57 setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 src
drwxr-xr-x 7 root root 4096 2011-03-09 08:57 test
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 tests
-rw-r--r-- 1 root root  501 2011-03-09 08:57 TODO
-rw-r--r-- 1 root root    6 2011-03-09 08:57 VERSION
root@bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1# 

任何提示如何在 Bamboo 中设置作业?我正在使用 Mercurial,项目是用 Python 编写的。

I have a Bamboo instance setup to do builds with the following config:

  1. Bamboo version = 3.0.1
  2. when running the build, i got the following error:
09-Mar-2011 08:57:50    Pulling from repository `/root/POC/PRS' to directory '/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99'
09-Mar-2011 08:57:50    pulling from /root/POC/PRAEFECTUS
09-Mar-2011 08:57:50    searching for changes
09-Mar-2011 08:57:50    no changes found
09-Mar-2011 08:57:50    Copying repository from cache directory to source directory...
09-Mar-2011 08:57:50    Creating empty repository in directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:50    Pulling from repository `/root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99' to directory '/root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1'
09-Mar-2011 08:57:51    pulling from /root/bamboo-ci/xml-data/build-dir/_hg-repositories-cache/d20373e808a2d0e95a604129054231a0da36ff99
09-Mar-2011 08:57:51    requesting all changes
09-Mar-2011 08:57:51    adding changesets
09-Mar-2011 08:57:51    adding manifests
09-Mar-2011 08:57:51    adding file changes
09-Mar-2011 08:57:51    added 1 changesets with 810 changes to 810 files
09-Mar-2011 08:57:51    (run 'hg update' to get a working copy)
09-Mar-2011 08:57:52    810 files updated, 0 files merged, 0 files removed, 0 files unresolved
09-Mar-2011 08:57:52    Updated source code to revision: cc40b2d9c09ea747529887dd8db9319f53c5db4e
09-Mar-2011 08:57:52    Executing build PRQA-PRQAKEY-JOB1-2
09-Mar-2011 08:57:52    Running pre-build action: Build Number Stamper
09-Mar-2011 08:57:52    Running pre-build action: Clover Grails PreBuild Action
09-Mar-2011 08:57:52    Running pre-build action: VCS Version Collector
09-Mar-2011 08:57:52    Running pre-build action: Repository Isolation Enabler Action
09-Mar-2011 08:57:52    Running pre-build action: Maven Settings Prebuild Action
09-Mar-2011 08:57:52    Building started with ScriptBuilder
09-Mar-2011 08:57:52    
Starting to build 'PRAEFECTUS-QA - PRQA-PLAN - Default Job'
... running command line: /bin/sh Makefile
... in : /root/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1
09-Mar-2011 08:57:52    Makefile: 10: PYTHON: not found

but if we look at the folder listed in the error, the Makefile is there

root@bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1# ls -l
total 104
-rw-r--r-- 1 root root   45 2011-03-09 08:57 AUTHORS
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 bin
-rw-r--r-- 1 root root  138 2011-03-09 08:57 build-number.txt
-rw-r--r-- 1 root root  120 2011-03-09 08:57 CHANGES
-rwxr-xr-x 1 root root 9703 2011-03-09 08:57 ez_setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 images
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 init.d
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 iped
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 logrotate.d
-rw-r--r-- 1 root root  932 2011-03-09 08:57 Makefile
-rw-r--r-- 1 root root  175 2011-03-09 08:57 MANIFEST.in
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 nbproject
-rw-r--r-- 1 root root 1109 2011-03-09 08:57 NEWS
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 prs
drwxr-xr-x 3 root root 4096 2011-03-09 08:57 rpa
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 sbin
drwxr-xr-x 4 root root 4096 2011-03-09 08:57 scripts
-rw-r--r-- 1 root root   81 2011-03-09 08:57 setup.cfg
-rwxr-xr-x 1 root root 2796 2011-03-09 08:57 setup.py
drwxr-xr-x 2 root root 4096 2011-03-09 08:57 src
drwxr-xr-x 7 root root 4096 2011-03-09 08:57 test
drwxr-xr-x 5 root root 4096 2011-03-09 08:57 tests
-rw-r--r-- 1 root root  501 2011-03-09 08:57 TODO
-rw-r--r-- 1 root root    6 2011-03-09 08:57 VERSION
root@bambooserver:~/bamboo-ci/xml-data/build-dir/PRQA-PRQAKEY-JOB1# 

any tips on how to setup a Job in Bamboo ? i am using Mercurial and project is in Python.

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

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

发布评论

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

评论(1

绝影如岚 2024-10-28 04:49:01

正如我所看到的,您使用了专门用于运行 shell 脚本的 ScriptBuilder,而您可能需要一个运行命令的构建器

make 

您需要做的是:

  • 转到
  • “添加功能”中的管理/服务器功能,选择:功能类型:生成器,类型:命令,生成器标签:Make,路径:输入 make 实用程序的完整路径(即 /usr/bin/make),
  • 生成器更改为“Make”。

现在导航到您的计划配置并将 构建应该工作正常。

附言。
如果将来出现问题,您应该尝试在 Atlassian 的支持网站 (http://support.atlassian.com) 上报告问题

免责声明:是的,我为 Atlassian 工作

As I can see you've used a ScriptBuilder which is dedicated to running a shell script while you probably need a builder that runs a command

make 

What you need to do is:

  • go to Administration / Server Capabilities
  • in "Add Capability" select: Capability Type: Builder, Type: Command, Builder Label: Make, Path: enter the full path to your make utility (ie. /usr/bin/make)
  • now navigate to your plan configuration and change the builder to "Make"

After those changes your build should be working fine.

PS.
In case of future problems you should try reporting the problem on Atlassian's support site (http://support.atlassian.com)

Disclaimer: yes I work for Atlassian

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