Reputation: 2338
I have generated lint results as XML from the build process in the Jenkins with the following gradle script. Now I would like to generate report by using warning-ng-plugin. 'warning-ng-plugin' is already installed in the Jenkins. I am already generating a nice report for my java code base with warning-ng-plugin, but I am not sure what kind of parser or tools I need to specify for android code base in the Jenkinsfile. I see the XML file generated in the lint/reports/main.xml.
---- build.gradle
lintOptions {
lintConfig file("lint.xml")
xmlOutput file("lint/reports/main.xml")
warningsAsErrors true
xmlReport true
}
-- Jenkinsfile
stage('Post') {
junit 'bundles/*/generated/test-reports/test/TEST-*.xml'
junit 'android/*/build/test-results/**/TEST-*.xml'
recordIssues enabledForFailure: true, aggregatingResults: true, tools: [java(), pmdParser(pattern: '**/pmd/reports/main.xml')]
recordIssues enabledForFailure: true, aggregatingResults: true, tools: [java(), android(pattern: '**/lint/reports/main.xml')]
}
Please let me know how to generate report out of the android lint in the Jenkins.
Thanks.
Upvotes: 2
Views: 807
Reputation: 111
This worked for me:
recordIssues enabledForFailure: true, aggregatingResults: true, tools: [androidLintParser(pattern: '**/lint-results-*.xml')]
So try using androidLintParser
instead of android
.
Upvotes: 2