Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38993

Deterministic order of build condition block execution in Declarative

    Details

    • Similar Issues:

      Description

      The build condition responders (currently postBuild and notifications, soon to be post within a stage) currently execute in the order they're specified in the Jenkinsfile. That should be changed to a deterministic order that'll be the same every time, and that order should be well documented and exposed in the logs.

        Attachments

          Issue Links

            Activity

            Hide
            scarlson scott carlson added a comment -

            Just want to add we currently feel the same was Joseph Petersen feels above, follow my order or at the least always would be better at the end.  Thankfully we have a way around it for now.

            Show
            scarlson scott carlson added a comment - Just want to add we currently feel the same was Joseph Petersen feels above, follow my order or at the least always would be better at the end.  Thankfully we have a way around it for now.
            Hide
            stefanthurnherr Stefan Thurnherr added a comment - - edited

            Andrew Bayer Agree with the two previous comments, for a similar reason:

            post {
            	always {
            		deleteDir()
            	}
            	success {
            	   emailext to: 'some@address.mail',
            		subject: 'Build was successful!',
            		mimeType: 'text/html',
            		body: readFile('releaseNotes.html') -- file is already deleted by "always" post-condition above
            	}
            }
            
            Show
            stefanthurnherr Stefan Thurnherr added a comment - - edited Andrew Bayer Agree with the two previous comments, for a similar reason: post { always { deleteDir() } success { emailext to: 'some@address.mail' , subject: 'Build was successful!' , mimeType: 'text/html' , body: readFile( 'releaseNotes.html' ) -- file is already deleted by "always" post-condition above } }
            Hide
            casz Joseph Petersen added a comment -

            I think we should reopen this issue, if you disagree Andrew, go ahead and close it.

            Show
            casz Joseph Petersen added a comment - I think we should reopen this issue, if you disagree Andrew, go ahead and close it.
            Hide
            abayer Andrew Bayer added a comment -

            Yeah, I'm closing this. JENKINS-41519 covers documenting the order, since that's not actually documented at this point.

            Show
            abayer Andrew Bayer added a comment - Yeah, I'm closing this. JENKINS-41519 covers documenting the order, since that's not actually documented at this point.
            Hide
            bitwiseman Liam Newman added a comment -

            Bulk closing resolved issues.

            Show
            bitwiseman Liam Newman added a comment - Bulk closing resolved issues.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: