Grails Jenkins CI not working

273 views
Skip to first unread message

Sanjay Lama

unread,
Aug 19, 2015, 8:11:59 AM8/19/15
to Jenkins Users
I am trying to implement jenkins for Continuous integration with grails. But, I am getting following error every time:
[workspace] $ cmd.exe /C '""C:\Program Files (x86)\Jenkins\jobs\wrapperTest\workspace\grailsw.bat" "-Dgrails.work.dir=C:/Program Files (x86)/Jenkins/jobs/wrapperTest/workspace/target" -Dserver.port=8111 war --non-interactive --plain-output --stacktrace --refresh-dependencies && exit %%ERRORLEVEL%%"'
/Jenkins/jobs/wrapperTest/workspace/target was unexpected at this time.
Build step 'Build With Grails' marked build as failure
Finished: FAILURE


my grails version is : 2.4.5
and jenkins : 1.624

Grails app runs perfectly fine when i run via command line.

Mark Waite

unread,
Aug 19, 2015, 8:39:01 AM8/19/15
to Jenkins Users

Since work dir has a space in its path, you either need to quote the value or move work dir to a path which does not include a space.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bd9cfe9b-a646-486e-93f2-37761b19def0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Pyle

unread,
Aug 19, 2015, 9:15:54 AM8/19/15
to jenkins...@googlegroups.com
It also looks like there are two double quotes in the beginning right after the first single quote. I think there should only  be one double quote there, or the quoting will come out wrong. Also, I'm not sure you need the single quotes at all.

Eric

Sanjay Lama

unread,
Aug 19, 2015, 11:35:32 PM8/19/15
to Jenkins Users
Hello there!!
 I put quotes in work dir. But, now I am getting following error:
ERROR: Build step failed with exception
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: expecting EOF, found 'C' @ line 1, column 10.
   return ""C:/Program Files (x86)/Jenkins/jobs/test1/workspace/target""
            ^

1 error

	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302)
	at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:149)
	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:119)
	at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:131)
	at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:359)
	at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:142)
	at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:108)
	at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:236)
	at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:161)
	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:846)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:550)
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:526)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:503)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281)
	at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731)
	at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:578)
	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
	at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
	at com.g2one.hudson.grails.GrailsBuilder.eval(GrailsBuilder.java:337)
	at com.g2one.hudson.grails.GrailsBuilder.perform(GrailsBuilder.java:237)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
	at hudson.model.Build$BuildExecution.build(Build.java:205)
	at hudson.model.Build$BuildExecution.doRun(Build.java:162)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
	at hudson.model.Run.execute(Run.java:1741)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:98)
	at hudson.model.Executor.run(Executor.java:381)
Build step 'Build With Grails' marked build as failure
Finished: FAILURE

Could you please help me out? :)

Richard Bywater

unread,
Aug 19, 2015, 11:41:46 PM8/19/15
to Jenkins Users
The other alternative is to use the "legacy" version of the directory (e.g. C:\Progra~1\...)  I think you'll find it by doing a "dir /x c:\" on the commant prompt.

Richard.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Sanjay Lama

unread,
Aug 20, 2015, 3:13:44 AM8/20/15
to jenkins...@googlegroups.com
I changed my jenkins installation directory to other drive. And, its now working. Thank you all for helping me. :)

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/sRST2RzSAmg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMui947ktzP%2BFj1BWMxijUT%3DDXvLp4hcfJwxRPY8YSG0qtY-XQ%40mail.gmail.com.

Sanjay Lama

unread,
Aug 20, 2015, 3:13:56 AM8/20/15
to jenkins...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages