I'm trying to get a Jenkins build running on Cloudbees for my Grails application, however I'm running into trouble running the war target. It looks like Jenkins can't find the grails executable.
Anyone seen this before?
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://[email protected]/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
Grails require to have PATH set with GRAILS_HOME/bin, and grails jenkins plugin don't handle this. I've proposed a fix for this issue