I am trying to get the Warnings plugin collecting CheckStyle results within a pipeline.
I believe I am using all the latest versions of pipeline related modules, and the warnings modules.
A simplified version of my Jenkinsfile is something like:
timestamps {
node ('name') {
try
{ stage ('Checkout') {
checkout scm
} stage ('Build & Test') {
sh 'bash -x test.sh'
} stage ('CheckStyle') {
sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c /home/user/checkstyle.xml -f xml -c target/checkstyle-results.xml src'// Doesn't work
// step([$class: 'CheckStylePublisher',
// canRunOnFailed: true,
// defaultEncoding: '',
// healthy: '100',
// pattern: '**/target/checkstyle-result.xml',
// unHealthy: '90',
// useStableBuildAsReference: true
// ])// Doesn't work
// step([$class: 'WarningsPublisher', consoleParsers: [[parserName: 'CheckStyle']]])
// Doesn't work
def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: '**/target/checkstyle-result.xml'
publishIssues issues:[checkstyle] }
}
catch (caughtErr)
{
}
finally
{
}
}
}
Where I have tried three different methods to collect the checkstype results, none of which work (I have left two of them commented out for reference - but beleive these are methods for the legacy checkstyle plugin, not the newly integrated warnigns plugin?).
I believe the last method using scanForIssues is the correct method as per here:
https://github.com/jenkinsci/warnings-plugin/blob/master/Jenkinsfile.local
However on build, I see the checkstyle results being generated, but get the following error message
java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among steps
I am trying to get the Warnings plugin collecting CheckStyle results within a pipeline.
I believe I am using all the latest versions of pipeline related modules, and the warnings modules.
A simplified version of my Jenkinsfile is something like:
timestamps {
node ('name') {
try
{stage ('Checkout') {
checkout scm
}stage ('Build & Test') {
sh 'bash -x test.sh'
}stage ('CheckStyle') {
sh 'java -jar /home/user/checkstyle/checkstyle-6.5-all.jar -c /home/user/checkstyle.xml -f xml -c target/checkstyle-results.xml src'// Doesn't work
// step([$class: 'CheckStylePublisher',
// canRunOnFailed: true,
// defaultEncoding: '',
// healthy: '100',
// pattern: '**/target/checkstyle-result.xml',
// unHealthy: '90',
// useStableBuildAsReference: true
// ])
// Doesn't work
// step([$class: 'WarningsPublisher', consoleParsers: [[parserName: 'CheckStyle']]])
// Doesn't work
def checkstyle = scanForIssues tool: [$class: 'CheckStyle'], pattern: '**/target/checkstyle-result.xml'
publishIssues issues:[checkstyle]}
}
catch (caughtErr)
{
}
finally
{
}
}
}
Where I have tried three different methods to collect the checkstype results, none of which work (I have left two of them commented out for reference - but beleive these are methods for the legacy checkstyle plugin, not the newly integrated warnigns plugin?).
I believe the last method using scanForIssues is the correct method as per here:
https://github.com/jenkinsci/warnings-plugin/blob/master/Jenkinsfile.local
However on build, I see the checkstyle results being generated, but get the following error message
java.lang.NoSuchMethodError: No such DSL method 'scanForIssues' found among stepsAny ideas?Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/00750112-2e37-4213-91b3-01c87686433c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/71651BEB-5A46-4E4C-B8E5-C8C688B3D162%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/00750112-2e37-4213-91b3-01c87686433c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/00750112-2e37-4213-91b3-01c87686433c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/71651BEB-5A46-4E4C-B8E5-C8C688B3D162%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/1d291cec-9b90-44bb-9a82-cd47b0db906b%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAH_GKWuSX%2BiQjqPwwb0jM8nc6oLnCW37HaWM1RffCA_bcNsumQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYzcArn7JE6mCTVO0-SKXWrbUKtY82pxkXa7PGJ%2BFp1K0Q%40mail.gmail.com.
def checkstyle = scanForIssues tool: [$
class
:
'CheckStyle'
], pattern:
'**/target/checkstyle-result.xml'
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/546f6fb6-2578-4e03-92a2-c2db865415ab%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYy8XzcznAug_SbJCFCctPkM1XhO-MuYww9%3D90cLUeDO-w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3FB143F1-C598-4C62-A175-A8D54D836024%40gmail.com.
Am 30.10.2018 um 12:16 schrieb dean warren <dean.wa...@gmail.com>:
And also noted this for the same some, following emailing results10:58:11 Sending e-mails to: ....
[Pipeline] }
[Pipeline] // node
[Pipeline] }
[Pipeline] // timestamps
[Pipeline] End of Pipeline
java.nio.charset.MalformedInputException: Input length = 1
On Tue, Oct 30, 2018 at 11:15 AM dean warren <dean.wa...@gmail.com> wrote:
Ahh... I am clearly a doofus 's' !Sorry, you know what its like, doing one thing with left hand, something else with other... and miss things.So now I see the following10:58:10 [CheckStyle] Searching for all files in '/home/user/workspace/TG.integrate_jenkins_ci-TKKXRODLMWWUDKMVKENHFQYQ7E2ZP5QAC72HYNHV6PXXEX75DW2Q' that match the pattern '**/target/checkstyle-results.xml'
10:58:10 [CheckStyle] -> found 1 file
10:58:10 [CheckStyle] Successfully parsed file /home/user/workspace/TG.integrate_jenkins_ci-TKKXRODLMWWUDKMVKENHFQYQ7E2ZP5QAC72HYNHV6PXXEX75DW2Q/target/checkstyle-results.xml
10:58:10 [CheckStyle] -> found 2983 issues (skipped 0 duplicates)However the build now fails,I assume because of all of the checkstyle issues (all 2983 of them!) - this is fine.But the checkstyle icon has dissapeared for this build.e.g. a good build, but not finding the checkstyle file, so no build failure and the checkstyle icons appear but with no warnings/errors.
<image.png>
But on the failed build the icons have dissappeared.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYxk3Ca2ZqgxaUk1_oXAzkutsemvrPo2%2B2PgrQ_ocB6Log%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6CF96490-9536-4F70-B078-B61AEFD07592%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/546f6fb6-2578-4e03-92a2-c2db865415ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYy8XzcznAug_SbJCFCctPkM1XhO-MuYww9%3D90cLUeDO-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3FB143F1-C598-4C62-A175-A8D54D836024%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYxk3Ca2ZqgxaUk1_oXAzkutsemvrPo2%2B2PgrQ_ocB6Log%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d3876eab-a906-47ca-a585-9840821a3e4f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/546f6fb6-2578-4e03-92a2-c2db865415ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYy8XzcznAug_SbJCFCctPkM1XhO-MuYww9%3D90cLUeDO-w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3FB143F1-C598-4C62-A175-A8D54D836024%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYxk3Ca2ZqgxaUk1_oXAzkutsemvrPo2%2B2PgrQ_ocB6Log%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/6CF96490-9536-4F70-B078-B61AEFD07592%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d3876eab-a906-47ca-a585-9840821a3e4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/A70AF29D-CC37-43F7-B291-8E6C54DA49DD%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYw7JSdDKL4X7DMTj55dotjF3FROhM-_-KUJ5BO2UCf%2B5g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/9BB4E4D0-BD40-4D61-969E-149240806592%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKYjVYwmzTN1Sd6YsOqHKN6ZAvnZQ2jEfkLajKQeLneExq0seQ%40mail.gmail.com.