Thanks for your answer.
From: jenkinsci-users@googlegroups.com
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of jer...@bodycad.com
Sent: 19 October 2017 15:36
To: Jenkins Users <jenkinsci-users@googlegroups.com>
Subject: Re: Declarative script: 'bat' command fails but job su
Not sure about declarative pipeline (I haven't played with them yet). but
for normal pipeline I use it this way:
bat returnStatus: false, script: "\"${bcad.msbuild_current}\"
${bcad.msbuild_solution_name} ${bcad.msbuild_default_arg} /t:Build"
You can find the doc here:
Thanks very much for your reply.
> Take care batch error level only is valid for the last command and not a
> cumulative flag.
Yes, that was exactly the issue. I followed your advice and the script works
correctly now.
> Also make sure you give the proper bat argument returnStatus into your
Take care batch error level only is valid for the last command and not a
cumulative flag. So every msbuild command you run should check the error
level result and exit batch according to it with proper error code. This
will make the bat command failed properly. I personnaly would suggest, you
Yes, that’s right. Sorry for using wrong term.
--
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-users+unsubscr...@googlegroups.com.
To view this
So you don't mean "script", you mean using "bat" as you would "sh". Is
that right?
stage('Build') {
steps {
script {
--
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
Here’s a better view of my script:
pipeline {
agent none
options { buildDiscarder(logRotator(numToKeepStr: '20')) }
triggers {
pollSCM('H/5 * * * *')
}
stages {
stage('build_gcc') {
}
stage('build_VisualStudio') {
>bat '''
What type of quote(s) is that? Three single quotes?
--
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
Where is "script" in the original example?
--
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-users+unsubscr...@googlegroups.com.
To view this
A follow-up to this:
I ran the failing msbuild command from the command line (in the workspace) and
checked the errorlevel, it was 1.
I then replayed the declarative script with some extra code:
msbuild %WORKSPACE%\\MSVC\\ /p:Configuration=config_2 /p:Platform="Win32"
10 matches
Mail list logo