[JIRA] (JENKINS-52084) Sequential stages post section does not execute in the expected context

1 view
Skip to first unread message

vossad01@gmail.com (JIRA)

unread,
Jun 20, 2018, 4:26:02 PM6/20/18
to jenkinsc...@googlegroups.com
Adam Voss created an issue
 
Jenkins / Bug JENKINS-52084
Sequential stages post section does not execute in the expected context
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2018-06-20 20:25
Environment: pipeline-model-extensions v1.3
Priority: Major Major
Reporter: Adam Voss

The following Jenkinsfile fails with

Error when executing always post condition:
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing

pipeline {
  agent none

  stages {
    stage('Hello World') {
      agent any

      stages {
        stage('Nested') {
          steps {
            echo 'Hi!'
          }
        }
      }

      post {
        always {
          deleteDir()
        }
      }
    }
  }
}

I would expect post to run on the node selected for the 'Hello World' stage as it does in the following, working example that does not utilize sequential stages:

pipeline {
  agent none

  stages {
    stage('Hello World') {
      agent any

      steps {
        echo 'Hi!'
      }

      post {
        always {
          deleteDir()
        }
      }
    }
  }
}
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Jun 20, 2018, 5:35:03 PM6/20/18
to jenkinsc...@googlegroups.com
Andrew Bayer commented on Bug JENKINS-52084
 
Re: Sequential stages post section does not execute in the expected context

Your expectations are correct - I'll have to reproduce this locally but assuming I can, this is definitely a bug.

andrew.bayer@gmail.com (JIRA)

unread,
Jun 26, 2018, 2:22:02 PM6/26/18
to jenkinsc...@googlegroups.com
Change By: Andrew Bayer
Status: In Progress Review
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

andrew.bayer@gmail.com (JIRA)

unread,
Jun 26, 2018, 2:22:02 PM6/26/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Jun 26, 2018, 2:22:02 PM6/26/18
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-52084
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Jun 27, 2018, 10:49:02 AM6/27/18
to jenkinsc...@googlegroups.com
 

Merged, releasing as part of 1.3.1 as we speak.

Change By: Andrew Bayer
Status: In Review Resolved
Resolution: Fixed

vossad01@gmail.com (JIRA)

unread,
Jul 1, 2018, 7:49:03 PM7/1/18
to jenkinsc...@googlegroups.com
Adam Voss commented on Bug JENKINS-52084
 
Re: Sequential stages post section does not execute in the expected context

Thanks for fixing this!  Not that there was any doubt, but I installed the update and have happily (and successfully) taken advantage of this functionality in my builds.

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:54 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

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