Skip to content

Instantly share code, notes, and snippets.

@zdtsw
Created October 10, 2018 15:01
Show Gist options
  • Save zdtsw/a8b8a44878f44bb909d793a41ed08145 to your computer and use it in GitHub Desktop.
Save zdtsw/a8b8a44878f44bb909d793a41ed08145 to your computer and use it in GitHub Desktop.
LogParser plugin not working for pipeline job
LogParserPublisher is the plugin not working well with pipeline job , in the old fashine Jenkins1.0 it seems quite ok
e.g
stage('1'){
node('master'){
echo " FAILURE "
}
}
stage('2'){
node('master'){
step([$class: 'LogParserPublisher', failBuildOnError: true, parsingRulesPath: '/home/jenkins/rules/myRule.txt', Graphs: true, unstableOnWarning: true, useProjectRule: false])
echo "should not be called"
}
}
stage('3'){
node('master'){
cho "update"
}
}
In the above exmple, you expect "FAILURE" is caughted by LogParsePublisher, and stage 3 should not be called.
But in reality, after differnt test combinitaion, it always calls stage 3 , regardless FAILURE matches rules in MyRule.txt or not
and the "should not be called" is the same case, always be called.
Even sometimes, not sure what is the triggered, job marked as "red" but sometime is "green"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment