[JIRA] (JENKINS-54190) All of the parallel stages with a regression post trigger will trigger if one of the stages fail.

2 views
Skip to first unread message

mrjunzehe@gmail.com (JIRA)

unread,
Oct 22, 2018, 3:04:03 PM10/22/18
to jenkinsc...@googlegroups.com
Junze He created an issue
 
Jenkins / Bug JENKINS-54190
All of the parallel stages with a regression post trigger will trigger if one of the stages fail.
Issue Type: Bug Bug
Assignee: Mads Nielsen
Components: blueocean-plugin, pipeline, postbuild-task-plugin
Created: 2018-10-22 19:03
Environment: Worker Operating Systems: Debian Stretch
Jenkins ver 2.138
Pipeline ver 2.5
Blue Ocean 1.8.3
Priority: Minor Minor
Reporter: Junze He

This happens only if that stage fails before the other stages. If the failing stage happens last then the stages which have already completed as passing do not have their regression post conditions triggered. 

Otherwise, the currentBuild.currentResult of the other stages, which should be passing, become FAILURE despite all of the steps being green.

// Sample Jenkinsfile to test this
#!groovy

pipeline {
  agent {
    node {
      label ""
      customWorkspace "workspace/test_regression"
    }
  }

  options {
    buildDiscarder(logRotator(numToKeepStr: '50'))
    compressBuildLog()
    timestamps()
  }

  stages {
    stage('Parallel'){
      parallel {
        stage("Passing Stage 1") {
          options {
            timeout(time: 120, unit: 'MINUTES')
          }
          steps {
            sh "ls"
          }
          post {
            regression {
              echo "This stage has a regression"
              echo "Current Result: ${currentBuild.currentResult}"
              echo "Previous Build Result: ${currentBuild.previousBuild.result}"
            }
          }
        }

        stage("Failing Stage 1") {
          options {
            timeout(time: 120, unit: 'MINUTES')
          }
          steps {
            sh "ls nothing"
          }
          post {
            regression {
              echo "This stage has a regression"
              echo "Current Result: ${currentBuild.currentResult}"
              echo "Previous Build Result: ${currentBuild.previousBuild.result}"
            }
          }
        }

        stage("Passing Stage 2") {
          options {
            timeout(time: 120, unit: 'MINUTES')
          }
          steps {
            echo "Passing Stage"
          }
          post {
            regression {
              echo "This stage has a regression"
              echo "Current Result: ${currentBuild.currentResult}"
              echo "Previous Build Result: ${currentBuild.previousBuild.result}"
            }
          }
        }

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

andrew.bayer@gmail.com (JIRA)

unread,
Oct 22, 2018, 11:11:02 PM10/22/18
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
Change By: Andrew Bayer
Component/s: pipeline-model-definition-plugin
Component/s: blueocean-plugin
Component/s: pipeline
Component/s: postbuild-task-plugin

andrew.bayer@gmail.com (JIRA)

unread,
Oct 22, 2018, 11:11:02 PM10/22/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Nov 7, 2018, 12:33:02 PM11/7/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Nov 7, 2018, 12:33:02 PM11/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-54190
 
Re: All of the parallel stages with a regression post trigger will trigger if one of the stages fail.

Yes - regression and fixed can only look at the whole build's status, so are really only useful for post at the end of the build. Sorry.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:18 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Won't Fix
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages