0

I already managed to connect my git and automate Gradle build and execute android lint as the post-build action of the Jenkins. I can see the lint-results.xml file created in the following location.

myapp/app/build/reports/lint-results.xml

As the next approach, I need to read this XML file (preferably using Java). I can write a program which reads XML elements but how can we identify if the Jenkins build is successful which results in triggering the XML reading java app?

Is it possible to add this java app to the post-build process of the Jenkins too? So it should be able to execute once the lint check is complete and the XML file is created.

Appreciate your insight as I'm new to Jenkins. Thanks.

channae
  • 951
  • 1
  • 12
  • 28
  • Depending on how you have set up your build job there are several ways to do that. For example the first job could trigger a second one when finished or you do in in a post build step or in a pipeline. – Henry Jan 09 '18 at 05:57
  • I'm using post build step for generating Android Lint XML file. So this has to come after post-build Lint execution. But how can we add a JAVA app to execute after post-build Lint execution? – channae Jan 09 '18 at 06:06

1 Answers1

0

Why aren't you simply using the Jenkins Lint plugin. It's quite handy and you only need to feed the xml file into it and will get all of the benefits for free.

Niklas
  • 23,674
  • 33
  • 131
  • 170