-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
Windows
This is my Jenkinsfile that's saved in my git repository, whenever I run a new Jenkins Build, it immediately fails with the trailing error, yet the msbuild command is correct, it runs fine from the command line. Any help would be appreciated.
pipeline {
agent {
docker 'node:7.7.3'
}
stages {
stage('Build') {
steps {
bat echo 'Checking node.js version..'
bat echo 'node -v'
bat echo 'Restore nugets..'
bat 'nuget restore mySolution.sln'
bat echo 'Building..'
bat "C:
Program Files (x86)\\MSBuild\\14.0\\Bin
msbuild.exe" mySolution.sln /noautorsp /ds /nologo /t:clean,rebuild /p:Configuration=Debug /v:m /p:VisualStudioVersion=14.0 /clp:Summary;ErrorsOnly;WarningsOnly /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}
}
}
stage('Test') {
steps {
bat echo 'Testing..'
}
}
stage('Deploy') {
steps {
bat echo 'Deploying....'
}
}
}
post {
success {
bat echo 'Pipeline Succeeded'
}
failure {
bat echo 'Pipeline Failed'
}
unstable {
bat echo 'Pipeline run marked unstable'
}
}
}
Error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 14: expecting '}', found '/' @ line 14, column 84.
\msbuild.exe" eSignWebApp.sln /noautorsp
^
1 error
at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:150)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:120)
at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:132)
at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:360)
at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:145)
at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:111)
at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:237)
at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:167)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:67)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:430)
at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:393)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:238)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Finished: FAILURE