-
Bug
-
Resolution: Won't Fix
-
Major
-
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']) } } } } }
This is documented in the Wiki: Pipelines don't have post-build actions, so the build result, build ordinal, and the build success boolean must be set manually. They will default to "?", 5, and false respectively unless set before calling the step. The boolean value is set according to the ordinal value and the ordinal value is fetched according to build result, so only the build result have to be set manually.
If you add the the echo to the post action you have there `echo "post build result: ${currentBuild.result}"` you will get `post build result: null`.