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

post { unsuccessful {}} doesn't fire without a success {}

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline
    • None

      If I have a:

      post {
        unsuccessful {
          println("unsuccessful")
        }
      } 

      without also having a success block in there, the unsuccessful block fails to run as if it were just not there.

      Since empty stages are not allowed I had to write a noop() step in a pipeline library that does nothing in order to have a:

        success { noop() }

      in my post stage so that the unsuccessful stage would run.

            Unassigned Unassigned
            brianjmurrell Brian J Murrell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: