对于Grails 2.2.2应用程序,Cloudbees Jenkins构建失败

时间:2013-05-29 23:06:56

标签: grails jenkins cloudbees

我正在尝试使用Cloudbees为我的Grails应用程序运行Jenkins构建,但是我在运行战争目标时遇到了麻烦。看起来Jenkins无法找到可执行的grails。

之前有人见过这个吗?

Started by user xxxx
Building remotely on s-f349965a in workspace /scratch/jenkins/workspace/myApp
Checkout:myApp / /scratch/jenkins/workspace/myApp - hudson.remoting.Channel@b75fe72:s-f349965a
Using strategy: Default
Last Built Revision: Revision 09454e78a993e106a5c2010e836b8d71652b9534 (origin/HEAD, origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from ssh://git@git.cloudbees.com/myCompany/myApp.git
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision 09454e78a993e106a5c2010e836b8d71652b9534 (origin/HEAD, origin/master)
Checking out Revision 09454e78a993e106a5c2010e836b8d71652b9534 (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[myApp] $ /scratch/jenkins/workspace/myApp/grailsw upgrade --non-interactive
Downloading http://dist.springframework.org.s3.amazonaws.com/release/GRAILS/grails-2.2.2.zip to /home/jenkins/.grails/wrapper/grails-2.2.2-download.zip...
Extracting /home/jenkins/.grails/wrapper/grails-2.2.2-download.zip to /home/jenkins/.grails/wrapper/2.2.2

| Loading Grails 2.2.2

| Configuring classpath

Cannot find plugin descriptor for path '/scratch/jenkins/workspace/watch-scaffolding'.

| Configuring classpath.
| Environment set to development
| Environment set to development.

| Environment set to development..
| Environment set to development...
| Environment set to development....

| Environment set to development.....

| Resolving plugin hibernate. Please wait...

| Plugin 'hibernate' with version '2.2.2' is already installed
| Resolving plugin tomcat. Please wait...

| Plugin 'tomcat' with version '2.2.2' is already installed
| Please make sure you view the README for important information about changes to your source code.
| Project upgraded

[myApp] $ /scratch/jenkins/workspace/myApp/grailsw war --non-interactive

| Loading Grails 2.2.2

| Configuring classpath

| Configuring classpath.
| Environment set to production
| Environment set to production.

| Environment set to production..
| Environment set to production...
| Environment set to production....

| Environment set to production.....

WAR packaging started on myApp version 0.1 build null
| Packaging Grails application

| Retrieving stats about the application

| Error Error executing script War: java.io.IOException: Cannot run program "grails": error=2, No such file or directory (Use --stacktrace to see the full trace)

Build step 'Build With Grails' marked build as failure
[cloudbees-deployer] Skipping deployment as build result is FAILURE
Finished: FAILURE

1 个答案:

答案 0 :(得分:1)

Grails需要使用GRAILS_HOME / bin设置PATH,而grails jenkins插件不会处理此问题。我为此问题提出了a fix