Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When currentBuild.result change during declarative always closure, it's value not refreshed #550

Open
wityamin opened this issue Aug 22, 2022 · 0 comments

Comments

@wityamin
Copy link

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 18

Reproduction steps

pipeline {
agent any

stages {
    stage('Hello') {
        steps {
            echo 'Hello World'
        }
    }
}
post {
    always{
        error "Error from always"
    }
    success{
        echo "SUCCESS"
    }
     unsuccessful {
        echo "NOT SUCCESS"
     }
}

}

Expected Results

NOT SUCCESS

Actual Results

SUCCESS

Anything else?

Probably the orders here:
https://github.com/jenkinsci/JenkinsPipelineUnit/blob/master/src/main/groovy/com/lesfurets/jenkins/unit/declarative/PostDeclaration.groovy#L58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant