Skip to main content

How to Iterate Through the Last Successful Builds in Pipeline Job?

Comments

2 comments

  • Vaclave Vaclave

    It may be useful to do:

    build.result.toString().equals("SUCCESS")

    rather then:

    build.result != 'FAILURE'

    because the build.result field is a hudson.model.Result so it won't ever be equal to a String.

    2
  • Richard Scott

    changing the double quotes on  build.result.toString().equals("SUCCESS")

    To

    build.result.toString().equals('SUCCESS')

    filtered the SUCCESS string on my pipe line jobs 

     

    0

Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.