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

Build cause is not resetted after failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • naginator-plugin
    • None
    • Naginator v1.8 / Jenkins 1.529

      Start a job adding naginator auto-rebuilding after failure e.g. 2 times.
      echo properties shows:
      BUILD_CAUSE=MANUALTRIGGER
      BUILD_CAUSE_MANUALTRIGGER=true

      Add exit 1 or something to fail the build. Autorebuild will restart the job and echo properties shows:
      BUILD_CAUSE=NAGINATORCAUSE
      BUILD_CAUSE_NAGINATORCAUSE=true

      Perfect. But:
      Press "Rebuild" button on the job page to rebuild the failed build will not reset the build cause to manual triggered. Build cause is still naginator...

      Please either check this behavior in the unrelased (1.9) feature for badgets or reset the naginator-variables each time the "rebuild" button is pressed.

      Background:
      for adding the badge we're using the groovy script:

      if(manager.logContains(".*env.BUILD_CAUSE=NAGINATORCAUSE.*")){
          manager.addBadge("redo.gif", "Restarted by Naginator (Autorebuild)")
      }
      

      which is not working in this case.

      Thanks

            ndeloof Nicolas De Loof
            zioschild Sven Appenrodt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: