[JIRA] (JENKINS-42308) Command line parsing failed: Unclosed single-quoted string

5 views
Skip to first unread message

jflynn@lexmark.com (JIRA)

unread,
Feb 24, 2017, 10:24:03 AM2/24/17
to jenkinsc...@googlegroups.com
John Flynn created an issue
 
Jenkins / Bug JENKINS-42308
Command line parsing failed: Unclosed single-quoted string
Issue Type: Bug Bug
Assignee: Ken Dang
Attachments: coverity_error.rtf
Components: coverity-plugin
Created: 2017/Feb/24 3:23 PM
Environment: Jenkins 1.651.3, Build now with coverity analysis Windows server 2013 R2. Coverity Analysis ver 8.7.1, Coverity-Plugin ver 1.8.1
Labels: coverity
Priority: Blocker Blocker
Reporter: John Flynn

This is similar to JenkinsJENKINS-38624
BZ 94839 - MSBuild Projects no longer work after upgrading to 1.8.0 (https://issues.jenkins-ci.org/browse/JENKINS-38624) which was answered as fixed in version 1.8.1 of the coverity plugin, but this is with gradle instead of MSBuild.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jflynn@lexmark.com (JIRA)

unread,
Feb 24, 2017, 10:28:03 AM2/24/17
to jenkinsc...@googlegroups.com
John Flynn updated an issue
Change By: John Flynn
This is similar to JenkinsJENKINS-38624
BZ 94839 - MSBuild Projects no longer work after upgrading to 1.8.0 (https://issues.jenkins-ci.org/browse/JENKINS-38624) which was answered as fixed in version 1.8.1 of the coverity plugin, but this is with gradle instead of MSBuild.


bq . [Gradle] - Launching build.
ERROR: Build step failed with exception
java.lang.RuntimeException: Command line parsing failed: Unclosed single-quoted string.
at jenkins.plugins.coverity.CoverityUtils.evaluateEnvVars(CoverityUtils.java:146)
at jenkins.plugins.coverity.CoverityUtils.prepareCmds(CoverityUtils.java:196)
at jenkins.plugins.coverity.CoverityLauncherDecorator$DecoratedLauncher.launch(CoverityLauncherDecorator.java:356)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$ProcStarter.join(Launcher.java:388)
at hudson.plugins.gradle.Gradle.performTask(Gradle.java:294)
at hudson.plugins.gradle.Gradle.perform(Gradle.java:152)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
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:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Invoke Gradle script' marked build as failure

jflynn@lexmark.com (JIRA)

unread,
Feb 24, 2017, 10:28:03 AM2/24/17
to jenkinsc...@googlegroups.com
John Flynn updated an issue
This is similar to JenkinsJENKINS-38624
BZ 94839 - MSBuild Projects no longer work after upgrading to 1.8.0 (https://issues.jenkins-ci.org/browse/JENKINS-38624) which was answered as fixed in version 1.8.1 of the coverity plugin, but this is with gradle instead of MSBuild.



bq [Gradle] - Launching build.

ERROR: Build step failed with exception
java.lang.RuntimeException: Command line parsing failed: Unclosed single-quoted string.
at jenkins.plugins.coverity.CoverityUtils.evaluateEnvVars(CoverityUtils.java:146)
at jenkins.plugins.coverity.CoverityUtils.prepareCmds(CoverityUtils.java:196)
at jenkins.plugins.coverity.CoverityLauncherDecorator$DecoratedLauncher.launch(CoverityLauncherDecorator.java:356)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$ProcStarter.join(Launcher.java:388)
at hudson.plugins.gradle.Gradle.performTask(Gradle.java:294)
at hudson.plugins.gradle.Gradle.perform(Gradle.java:152)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
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:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Invoke Gradle script' marked build as failure

jflynn@lexmark.com (JIRA)

unread,
Feb 24, 2017, 10:29:02 AM2/24/17
to jenkinsc...@googlegroups.com
John Flynn updated an issue
This is similar to JenkinsJENKINS-38624
BZ 94839 - MSBuild Projects no longer work after upgrading to 1.8.0 (https://issues.jenkins-ci.org/browse/JENKINS-38624) which was answered as fixed in version 1.8.1 of the coverity plugin, but this is with gradle instead of MSBuild.


bq.
[Gradle] - Launching build.
ERROR: Build step failed with exception
java.lang.RuntimeException: Command line parsing failed: Unclosed single-quoted string.
at jenkins.plugins.coverity.CoverityUtils.evaluateEnvVars(CoverityUtils.java:146)
at jenkins.plugins.coverity.CoverityUtils.prepareCmds(CoverityUtils.java:196)
at jenkins.plugins.coverity.CoverityLauncherDecorator$DecoratedLauncher.launch(CoverityLauncherDecorator.java:356)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$ProcStarter.join(Launcher.java:388)
at hudson.plugins.gradle.Gradle.performTask(Gradle.java:294)
at hudson.plugins.gradle.Gradle.perform(Gradle.java:152)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
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:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Invoke Gradle script' marked build as failure

jflynn@lexmark.com (JIRA)

unread,
Feb 24, 2017, 2:38:01 PM2/24/17
to jenkinsc...@googlegroups.com
John Flynn commented on Bug JENKINS-42308
 
Re: Command line parsing failed: Unclosed single-quoted string

It appears that the 'useAdvancedParser' - "Use advanced parsing mechanism" is always true.

jbriggs@synopsys.com (JIRA)

unread,
Feb 27, 2017, 10:29:02 AM2/27/17
to jenkinsc...@googlegroups.com

jbriggs@synopsys.com (JIRA)

unread,
Feb 27, 2017, 10:29:02 AM2/27/17
to jenkinsc...@googlegroups.com
Joel Briggs commented on Bug JENKINS-42308
 
Re: Command line parsing failed: Unclosed single-quoted string

John, could you elaborate on the 'useAdvancedParser' setting? are you saying regardless of the job configuration it is true?

If it's possible for you to share the job config with a sample build build step whcih can reproduce that would help.

Thanks,
Joel

jflynn@lexmark.com (JIRA)

unread,
Feb 27, 2017, 11:04:01 AM2/27/17
to jenkinsc...@googlegroups.com

Hi Joel,

The "Use advanced parsing mechanism" option is not checked. Looking at the plugin code, it appears that if that is false, the code where the error is occurring should not have been called.

Here is the coverity section of the config.xml

<jenkins.plugins.coverity.CoverityPublisher plugin="cove...@1.8.1">
<cimStreams>
<jenkins.plugins.coverity.CIMStream>
<instance>Coverity</instance>
<project>CDCL_master_analysis</project>
<stream>CDCL_master_analysis</stream>
<id>1815448175</id>
<language>ALL</language>
<streamName/>
<defectFilters>...</defectFilters>
</jenkins.plugins.coverity.CIMStream>
</cimStreams>
<invocationAssistance>
<javaWarFilesNames/>
<csharpAutomaticAssemblies>false</csharpAutomaticAssemblies>
<csharpMsvsca>false</csharpMsvsca>
<isUsingMisra>false</isUsingMisra>
<isCompiledSrc>false</isCompiledSrc>
<isScriptSrc>false</isScriptSrc>
<isUsingPostCovBuildCmd>false</isUsingPostCovBuildCmd>
<isUsingPostCovAnalyzeCmd>false</isUsingPostCovAnalyzeCmd>
<useAdvancedParser>false</useAdvancedParser>
</invocationAssistance>
<failBuild>false</failBuild>
<unstable>false</unstable>
<keepIntDir>false</keepIntDir>
<skipFetchingDefects>false</skipFetchingDefects>
<hideChart>false</hideChart>
<unstableBuild>false</unstableBuild>
</jenkins.plugins.coverity.CoverityPublisher>

Thanks,
John

jbriggs@synopsys.com (JIRA)

unread,
Feb 27, 2017, 12:02:01 PM2/27/17
to jenkinsc...@googlegroups.com

I found the issue was when logging the build command (to console output), the CoverityLauncher was always using the "advanced parsing" flag as true. Additionally, I realized JENKINS-38624 was incorrectly closed (we asumed the existing windows env. var issues were causing that issue.

Both should be addressed in the upcoming release.

Reply all
Reply to author
Forward
0 new messages