[JIRA] (JENKINS-52348) Windows bat steps never fail

3 views
Skip to first unread message

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:33:02 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
 
Jenkins / Improvement JENKINS-52348
Windows bat steps never fail
Change By: A. D.
Summary: Windows bat step steps never fails fail
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:35:01 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
bat steps in Jenkins never fail:

 
----
{{ pipeline }}
{
{ {}}
{{     agent any

}}{{   stages }}
{{   { }}
{{   stage('Build') }}
{{       { }}
{{         steps }}
{{        }} { {{}}
{{           bat returnStatus: true, script: ''' }}
{{           EXIT 1 }}
{{           ''' }}
{{         } }}
{{       } }}
{{   } }}
{{ } }}
----
 

... results in:
----
[Jenkins Test-Pipeline] Running batch script

C:\Program Files (x86)\Jenkins\workspace\Jenkins Test-Pipeline>EXIT 1
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // stage{color}
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // node{color}
{color:#c1c7d0}[Pipeline] End of Pipeline{color}
Finished: *SUCCESS*

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:36:02 AM7/3/18
to jenkinsc...@googlegroups.com

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:37:01 AM7/3/18
to jenkinsc...@googlegroups.com

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:38:01 AM7/3/18
to jenkinsc...@googlegroups.com

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:38:02 AM7/3/18
to jenkinsc...@googlegroups.com

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:39:01 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
bat steps in Jenkins never fail:

 
----
pipeline
{
agent any

stages
{
stage('Build')
{
steps

{ bat returnStatus: true, script: '"


EXIT 1

'" }

}
}
}

 

... results in:
----
[Jenkins Test-Pipeline] Running batch script

C:\Program Files (x86)\Jenkins\workspace\Jenkins Test-Pipeline>EXIT 1
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // stage{color}
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // node{color}
{color:#c1c7d0}[Pipeline] End of Pipeline{color}
Finished: *SUCCESS*

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:39:02 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
bat steps in Jenkins never fail:

 
----
pipeline

{

 
agent any

 

 
stages

 
{

   
stage('Build')

   
{

     
steps

  

{        
bat returnStatus: true, script: ''' \

       
EXIT 1 \

       
''' \

      
}

    
}

 
}

}
----

 

... results in:
----
[Jenkins Test-Pipeline] Running batch script

C:\Program Files (x86)\Jenkins\workspace\Jenkins Test-Pipeline>EXIT 1
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // stage{color}
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // node{color}
{color:#c1c7d0}[Pipeline] End of Pipeline{color}
Finished: *SUCCESS*

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:39:03 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
bat steps in Jenkins never fail:

 
----
pipeline
{
agent any

stages
{
stage('Build')
{
steps
{
{ bat returnStatus: true, script: ' ''
" EXIT 1
' ''
" }

}
}
}


 

... results in:
----
[Jenkins Test-Pipeline] Running batch script

C:\Program Files (x86)\Jenkins\workspace\Jenkins Test-Pipeline>EXIT 1
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // stage{color}
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // node{color}
{color:#c1c7d0}[Pipeline] End of Pipeline{color}
Finished: *SUCCESS*

brille1@hotmail.com (JIRA)

unread,
Jul 3, 2018, 11:41:01 AM7/3/18
to jenkinsc...@googlegroups.com
A. D. updated an issue
bat steps in Jenkins never fail:

 
----
pipeline
{
agent any

stages
{
stage('Build')
{
steps

{ bat returnStatus: true, script: '
"

'' EXIT 1

' " '' }

}
}
}
----
 

*{color:#de350b}(Formatting above is scrambled by Jira){color}*

 

... results in:
----
[Jenkins Test-Pipeline] Running batch script

C:\Program Files (x86)\Jenkins\workspace\Jenkins Test-Pipeline>EXIT 1
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // stage{color}
{color:#c1c7d0}[Pipeline] }{color}
{color:#c1c7d0}[Pipeline] // node{color}
{color:#c1c7d0}[Pipeline] End of Pipeline{color}
Finished: *SUCCESS*

dbeck@cloudbees.com (JIRA)

unread,
Jul 24, 2018, 7:29:02 AM7/24/18
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
 
Jenkins / Bug JENKINS-52348
Change By: Daniel Beck
Issue Type: Improvement Bug

dbeck@cloudbees.com (JIRA)

unread,
Jul 24, 2018, 7:29:02 AM7/24/18
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Component/s: workflow-durable-task-step-plugin
Component/s: core

dbeck@cloudbees.com (JIRA)

unread,
Jul 24, 2018, 7:29:03 AM7/24/18
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
Change By: Daniel Beck
Priority: Blocker Major

marat@slonopotamus.org (JIRA)

unread,
Aug 30, 2019, 12:10:12 PM8/30/19
to jenkinsc...@googlegroups.com
Marat Radchenko commented on Bug JENKINS-52348
 
Re: Windows bat steps never fail

This is expected behavior, read documentation on returnStatus parameter:

 

Normally, a script which exits with a nonzero status code will cause the step to fail with an exception. If this option is checked, the return value of the step will instead be the status code.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

marat@slonopotamus.org (JIRA)

unread,
Aug 30, 2019, 12:10:12 PM8/30/19
to jenkinsc...@googlegroups.com
Marat Radchenko closed an issue as Not A Defect
 
Change By: Marat Radchenko
Status: Open Closed
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages