1

I am using a jenkinsfile to test and build an angular webapp. I am also using the Warnings Next Generation Plugin to show lint-warnings. But for actual build-warnings I still have to look inside the console-log.

--> Can I use the jenkins plugin "warnings ng" to parse warnings produced by "ng build"?

In the following code-snippet I show a simplified jenkins-step, that successfully creates a linter-report, but it can not parse the output of ng build.


stage("Analysis"){          
    steps{
        nodejs(nodeJSInstallationName: 'nodejs') {
            sh 'npm ci'
            sh 'eslint src --ext .ts -f checkstyle > report/checkstyle-result.xml'
            sh 'ng build --configuration production > report/build.log'
            recordIssues tools: [
                                    esLint(pattern: 'report/checkstyle-result.xml') // <-- this works
                                    ngBuild(pattern: 'report/build.log') // <-- this tool doesn't exist!
                                ]
        }
    }
}
wotanii
  • 2,470
  • 20
  • 38

0 Answers0