Influx build_result is not set correct if written in post section

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major
    • Component/s: influxdb-plugin
    • None

      I never get a 'SUCCESS' in the `build_result` field if data is reported to Influx in a pipeline `post` section.
      I would expect that at this time, the outcome is of the pipeline run is set.

      pipeline{
        stages {
          stage('A') {
            steps {
              echo "build result: ${currentBuild.result}"
              echo "current build result: ${currentBuild.currentResult}"
            }
          }
        }
        post{
          always{
            script {
              node {
                step([$class: 'InfluxDbPublisher', selectedTarget: 'myInflux'])
              }
            }
          }
        }
      }
      

        1. entry.png
          73 kB
          Christopher Fenner

            Assignee:
            Aleksi Simell
            Reporter:
            Christopher Fenner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: