Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would you please implement Jenkins/Hudson plugin? #79

Open
eagleliang opened this issue Mar 18, 2015 · 5 comments
Open

Would you please implement Jenkins/Hudson plugin? #79

eagleliang opened this issue Mar 18, 2015 · 5 comments

Comments

@eagleliang
Copy link

It would be a greater thing if implement as a jenkins plugin, and provide the way to config on jenkins UI.

Current configuration is a bit complex and confusing. E.g, the path of check rule (like checkstyle config file) should be absolute path,Or,sputnik always throw following exception when running on jenkins/hudson, even if you can run successfully on local with the same configuration.

17:13:47.899 [main] ERROR pl.touk.sputnik.engine.ReviewRunner - Processor Checkstyle error
pl.touk.sputnik.review.ReviewException: Unable to create Checkstyle checker
    at pl.touk.sputnik.processor.checkstyle.CheckstyleProcessor.createChecker(CheckstyleProcessor.java:61) ~[sputnik-1.4.0.jar:1.4.0]
    at pl.touk.sputnik.processor.checkstyle.CheckstyleProcessor.innerProcess(CheckstyleProcessor.java:44) ~[sputnik-1.4.0.jar:1.4.0]
    at pl.touk.sputnik.processor.checkstyle.CheckstyleProcessor.process(CheckstyleProcessor.java:32) ~[sputnik-1.4.0.jar:1.4.0]
    at pl.touk.sputnik.engine.ReviewRunner.review(ReviewRunner.java:24) ~[sputnik-1.4.0.jar:1.4.0]
    at pl.touk.sputnik.engine.Engine.run(Engine.java:33) [sputnik-1.4.0.jar:1.4.0]
    at pl.touk.sputnik.Main.main(Main.java:37) [sputnik-1.4.0.jar:1.4.0]
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to find android_checks.xml
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:342) ~[checkstyle-6.1.jar:6.1]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:286) ~[checkstyle-6.1.jar:6.1]
    at pl.touk.sputnik.processor.checkstyle.CheckstyleProcessor.createChecker(CheckstyleProcessor.java:57) ~[sputnik-1.4.0.jar:1.4.0]
    ... 5 common frames omitted
Caused by: java.io.FileNotFoundException: android_checks.xml
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:328) ~[checkstyle-6.1.jar:6.1]
    ... 7 common frames omitted
17:13:47.906 [main] INFO  pl.touk.sputnik.engine.ReviewRunner - Review finished for processor Checkstyle. Took 0 s
17:13:47.906 [main] WARN  pl.touk.sputnik.engine.ReviewRunner - Review for processor Checkstyle returned empty review
@SpOOnman
Copy link
Collaborator

I didn't write any Jenkins plugin yet. Do you have some experience with that and want to contribute?

@JKrag
Copy link

JKrag commented May 7, 2015

If I can find the time, in the near future, I might actually try to give this a shot, because I also think that it might be a cool plugin to have. I don't know if it is desirable to turn Sputnik into a Jenkins plugin. The correct approach would probably be to write a stand-alone Sputnik-plugin that uses the existing sputnik, without adding Jenkins dependencies to Sputnik.

@eagleliang Maybe you could provide some input on how you image the plugin should work? Should it provide the full config in the Jenkins UI ("replacing" the sputnik properties file?) or should it just be a lightweight approach where you can configure the name and path to the properties file (if not default)

Note: I can't promise that I will be able to make this, or when, but I hope, and the discussion is relevant either way, if anyone is going to do it at some point.

@eagleliang
Copy link
Author

If I can find the time, I'm glad to contribute. But I didn't make any Jenkins plugin neither.

@JKrag in my image:

  • this plugin should be a "post-build" action.
  • this plugin contains full function of Sputnik after install the plugin. User don't need to install it like current way
  • all configuration could be done through Jenkins UI, and the path to check rule files and source code could accept relative path to Jenkins "workspace"

@lbordowitz
Copy link

Is there any other reason that this has to be a post-build step OTHER than to support FindBugs? Why not do runtime java compilation?

I've written a Jenkins plugin before, and I've worked on one other. The actual configuration would be pretty simple, plus it would solve the plaintext credential issue (my biggest pet-peeve with sputnik).

@SpOOnman
Copy link
Collaborator

There is no reason that is needs to be post build action. I know at least two projects, where Sputnik is pre-build action and it works great for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants