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
Subject: Re: Declarative script: 'bat' command fails but job succeeds
Not sure about declarative p
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:
https://jenkins.io/doc/pip
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
r
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 discus
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 i
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') {
ag
>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 jenkinsci-users+unsubscr...@googlegroups.com.
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 discussion
7 10:45
To: jenkinsci-users@googlegroups.com
Subject: [** SUSPICIOUS EMAIL **] Declarative script: 'bat' command fails but
job succeeds
Hi
I have a declarative script that runs a ‘bat’ step. That step builds some VS
Studio projects on a Windows slave by calling msbuild:
steps {
Hi
I have a declarative script that runs a 'bat' step. That step builds some VS
Studio projects on a Windows slave by calling msbuild:
steps {
bat '''
call "%VSMSBUILDCMD%"
msbuild %WORKSPACE%\\MSVC\\ /p:Configuration=config_0
11 matches
Mail list logo