[JIRA] (JENKINS-62028) Jenkins pipeline fails to properly abort loop
Title: Message Title Daniel Beck updated an issue Jenkins / JENKINS-62028 Jenkins pipeline fails to properly abort loop Change By: Daniel Beck Component/s: core Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.205917.158763298.19870.1588235760184%40Atlassian.JIRA.
[JIRA] (JENKINS-62028) Jenkins pipeline fails to properly abort loop
Title: Message Title Christian Werner updated an issue Jenkins / JENKINS-62028 Jenkins pipeline fails to properly abort loop Change By: Christian Werner Component/s: core Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.205917.158763298.17861.1587878940066%40Atlassian.JIRA.
[JIRA] (JENKINS-62028) Jenkins pipeline fails to properly abort loop
Title: Message Title Christian Werner updated an issue Jenkins / JENKINS-62028 Jenkins pipeline fails to properly abort loop Change By: Christian Werner # Linux - Debian # Jenkins 2.204.2 # Create pipeline:{code:java}pipeline { agent any stages { stage('Ping') { steps { script { for (def i = 0; i < 500; i++) { echo "currentResult: ${currentBuild.currentResult}" sh "ping 127.0.0.1 -c 1"} } } } }}{code}# run pipeline# Abort pipeline# View build logExpected: pipeline aborts Actual:# The pipeline gets resumed, without interruption# updated code to see the expected behauvior{code}pipeline { agent any stages { stage('Ping') { steps { script { for (def i = 0; i < 500; i++) {if (currentBuild.rawBuild.getActions(jenkins.model.InterruptedBuildAction.class).isEmpty()) {echo "currentResult: ${currentBuild.currentResult}"} else {echo "ABORTED"error("aborted")} sh "ping 127.0.0.1 -c 1" } } } } }}{code} Add Comment This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
[JIRA] (JENKINS-62028) Jenkins pipeline fails to properly abort loop
Title: Message Title Christian Werner created an issue Jenkins / JENKINS-62028 Jenkins pipeline fails to properly abort loop Issue Type: Bug Assignee: Unassigned Components: pipeline Created: 2020-04-23 09:09 Priority: Major Reporter: Christian Werner Linux - Debian Jenkins 2.204.2 Create pipeline: pipeline { agent any stages { stage('Ping') { steps { script { for (def i = 0; i < 500; i++) { echo "currentResult: ${currentBuild.currentResult}" sh "ping 127.0.0.1 -c 1" } } } } } } run pipeline Abort pipeline View build log Expected: pipeline aborts Actual: The pipeline gets resumed, without interruption updated code to see the expected behauvior