竹子上的Grails 3 [英] Grails 3 on Bamboo
问题描述
有没有办法让Grails 3与Bamboo合作? Grails任务不支持它。我可以写一个自定义脚本或其他东西来处理这个战争世代,以便它可以被部署任务拾取吗?
有一种方法可以添加最初没有提供的任何Grails版本。例如,如果您需要某个系列的特定次要版本,而不是Bamboo默认的最新版本,则可以按照以下说明更改版本号。当Bamboo中的Grails 2.4升级到2.4.5时,我们原来是用2.4.4做的。您需要成为管理员,您需要配置实例你的工作在继续。假设有一个Linux实例,您可以轻松地添加Grails 3:
- 进入Bamboo管理。在云上,你点击左上角的小玉米(这是一个例子,github flavored markdown的代码屏蔽会非常有用 - 出于某种原因,我必须将一个额外的非项目符号变成一个代码块)er hamburger图标,然后单击配置。
- 转到图像配置
- 单击适当图像类型上的编辑。 $ b
-
将类似于以下内容的代码放入实例启动脚本中:
#install grails 3.1.1 for fun
curl -L https://github.com/grails/grails-core/releases/download/v3.1.1/grails-3.1.1.zip> grails-3.1.1.zip
unzip grails-3.1.1.zip
mv grails-3.1.1 / opt /
$ b-
(关于grails的好处是下载URL是完全可预测的,所以将3.1.1替换为您想要的版本号 - 3.1。例如0.RC2):
-
我还没有尝试过任何与Windows映像类似的东西,但我想这是可能的。
-
-
保存该脚本。这样做会将您带回图像配置列表。
现在转到该图像的功能,然后单击添加功能(或滚动到底部,或者有效)。 b $ b -
选择可执行文件作为功能类型。这为表单添加了另一个下拉菜单。
- 从新下拉列表中选择Grails。
- 可执行标签可以是任何内容, ,
Grails 3.1.1
看起来最好 - 路径应该只是解压后的路径
grails- 3.1.1
-/opt/grails-3.1.1
- 现在您应该可以用Grails 3.1.1创建一个Grails任务。 使用默认的测试报告位置,为了让您的test-app命令通过Grails 3.0传递,您需要更改测试报告目录。请参阅此问题与答案,以了解具体情况。
- Get into Bamboo administration. On cloud, you click on the little top left corn(This is an example of where github flavored markdown's code fencing would be REALLY useful -- for some reason I have to put an extra non-bulleted line in for the indent to become a code block)er hamburger icon, and click Configure.
- Go to Image Configurations
- Click Edit on the appropriate image type.
Put code similar to the following into the instance startup script
#install grails 3.1.1 for fun curl -L https://github.com/grails/grails-core/releases/download/v3.1.1/grails-3.1.1.zip > grails-3.1.1.zip unzip grails-3.1.1.zip mv grails-3.1.1 /opt/
(the nice thing about grails is the download URL is completely predictable, so replace 3.1.1 with the version number you want -- 3.1.0.RC2, for example):
I haven't tried anything similar with Windows images, but I would imagine it is possible.
Save that script. Doing so brings you back to the image configuration list.
Now go to Capabilities for that image, and click Add Capability (or scroll to the bottom, either works).
choose Executable as the capability type. This adds another dropdown to the form.
- Choose Grails from the new dropdown.
- Executable label can be anything, but for consistency,
Grails 3.1.1
looks best - Path should simply be the path where you put the unzipped
grails-3.1.1
--/opt/grails-3.1.1
- Now you should be able to create a Grails task with Grails 3.1.1 as the version.
此外,我们的Bamboo帐户已经运行足够长时间,因此我发现我们的功能列表中缺少JDK 1.8功能。我认为简单地添加一个标签 JDK 1.8
和路径 / opt / jdk-8
的JDK功能应该可以实现,但如果这不起作用,您可能需要点击还原为默认功能(然后添加之前添加的任何自定义功能)。
Is there a way to get Grails 3 to work with Bamboo? The Grails task does not support it. Can I write a custom script or something to handle the war generation such that it can be picked up by a Deployment task?
There is a way to add any version of Grails that is not originally provided. For example, if you need a specific minor version of a series, not the latest that Bamboo defaults to, you can simply change the version number in the instructions below. We did this originally with 2.4.4 when Grails 2.4 in Bamboo moved up to 2.4.5.
You will need to be an admin and you will need to configure the instance that your job runs on. Assuming a Linux instance, you can easily add Grails 3:
One other note to take is that the Gradle build process monkeys a little with the default test report location, so to get your test-app command to pass with Grails 3.0 you will need to change the test report directory. See this question and answer for specifics on that.
Also, our Bamboo account has been active long enough that I discovered the JDK 1.8 capability was missing from our capabilities list. I think that simply adding a JDK capability with label JDK 1.8
and path /opt/jdk-8
should do the trick, but if that doesn't work, you may need to click Revert to Default Capabilities (and then add back any custom capabilities you had added prior).
这篇关于竹子上的Grails 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!