Integrating SourceMonitor into a Jenkins CI-System - continuous-integration

I would like to integrate SourceMonitor into my Jenkins CI-system. Since there is no SourceMonitor plugin how can i make the results of SourceMonitor visible on my Jenkins Server.

There is an open issue associated with the Violations plugin.
You can vote up for the implementation of this issue: https://issues.jenkins-ci.org/browse/JENKINS-5741

I guess you're out of luck. You could take a look at similar plugins (probably FindBugs, PMD, Checkstyle plugins should be comparable) and write a plugin yourself.
You could also give a try to post to the Jenkins user mailing list, maybe someone there can help you.
Don't know what kind of output SourceMonitor produces, but if it produces HTML Reports, there is an HTML Publish Plugin, which would let you link and display those results in your job. Not as integrated as a real plugin would be, but perhaps that would be enough for you.

You only realistically have the following options:
Create a Hudson plugin for SourceMonitor yourself.
Contact the SourceMonitor development team and ask them to create a Hudson plugin.
Use an existing Hudson plugin that is similar to SourceMonitor.

Related

How can I detect plugin added and removed in Jenkins so I can improve the default output from the plugin jobConfigHistory?

I really love the jobConfigHistory plugin. Its diffs are so helpful.
I noticed that when I add or delete a plugin which requires no configuration, nothing is noticed by the plugin. Since plugin CRUD is often a source of pain and agony, I would love to be able to capture that information into my archiving. It would be most nifty if I could capture the version of the plugin as well, but even just the existence, just the add/delete would be really great. I didn't see it in the Jenkins System log.
One could periodically monitor the JenkinsHome/plugins folder, but is there an easier way?
thank you!

Eclipse sonar plugin vs findbugs+pmd+checkstyle eclipe plugins

We are trying to install a CI Platform with (Jenkins,sonar,eclipse ...).
So that every developer can make analysis on his code before commit, I'm wondering between two alternatives :
running local analysis with the sonar plugin.
install the different plugins that sonar use (findbug,pmd,checkstyle ...) and configure them to meet the sonar configuration.
I'm not sure which alternative to use? I used to work with findbugs,pmd, checkstyle in eclipse and they look great.
Can you tell me which is the best alternative?
Thanks in advance.
Regards.
With Sonar plugin you can manage the violations like:
Create a review
Mark a violations as false positive or fixed
View the hot classes and hot violations
View yours reviews
If you use separate plugins you have to go sonar web to do that.
The great advance of sonar is the reviews.
Other question is how many projects you have and will have. I currently work with more than 70 projects and many profiles. Is more simple to me run analysis with one plugin, because I need just add the server and find the project. With other plugin you need add the link for each project in each plugin configuration.
Why not install the Sonar Eclipse plugin?
This was designed to solve the following problems:
Sonar does not support parallel analysis of the same project. This issue rules out the option of each developer running Sonar locally. (See SONAR-2761, SONAR-3306)
You don't really want developers uploading metrics and source code into the Sonar database. They could be working on an uncommitted workspace and would therefore cause both inaccuracies and confusion if Sonar is being used for code review.
Sonar is really designed to be run from a continuous integration server (like Jenkins), building code that has been submitted onto a shared codestream (or branch)
The big advantages of using the Eclipse plugin are:
True local analysis, no updates of the Sonar database
Configuration of the other tools is retrieved from the Sonar server and jars automatically downloaded.
Centralized management of Sonar quality profiles

Sonar - reporting on most actively edited files?

I'd like to create a report in Sonar for the most actively edited files. I've looked around but can't find a plugin to do this. Any suggestions would be appreciated.
If relevant, my team uses AccuRev for SCM, and Sonar v2.14
Thanks in advance
Unfortunately, there's currently no plugin that meets your need (at least none that I'm aware of).
I could have suggested you to develop your own plugin based on the metrics generated by the SCM Activity Plugin, but Accurev is not supported so you would have to start from scratch :-/

How can I integrate Jenkins with Redmine?

I would like to integrate Jenkins with Redmine. If some build breaks, Jenkins would open an issue in Redmine to notify it with the console output.
How can I do it? Are there any plugins? Are there any implementation guides? I couldn't find a solution yet.
There are two ways to achieve this
install hudson plugin inside redmine, see http://www.redmine.org/plugins/t-ando_redmine_hudson , it will let you know the build inside redmine. (**2014.5.7 [Updated] change to redmine plugin list **)
install redmine plugin inside jenkins (hudson), unfortunately the plugin is not maintained any more, https://wiki.jenkins-ci.org/display/JENKINS/Redmine+Plugin . And JIRA jenkins plugin is a way how redmine plugin should be supported.
([Updated] the plugin is back since 2013)
[updated] I tried to add this functions for solution 2 in 2011.2, see my blog: http://larrycaiyu.com/blog/2011/02/24/associate-ci-build-information-in-redmine-issue-by-using-redmine-rest-api/, but I stopped after that, because
In the community, it seems solution 1 is preferred.
lots of functions are already inside JIRA, it is better to persuade them to make it as a common issue plugin inside jenkins.
You can try the e-mail-to-issue option in Redmine.
Configure Jenkins to send an e-mail to Redmine with detailed report.
Configure Redmine to accept the e-mail and transfer it to the issue.
You can configure whatever template you wish so the reports will be user-friendly. Further more Redmine has a simple incoming mail parser so that you can omit info you don't need.
No plugins needed, only settings in both tools.

TeamCity users: a few questions

These questions are for TeamCity users only
1) Is it possible to configure TeamCity to extract build artifact information based on your own your regular expressions? This is exactly what Pulse does here
2) Does TeamCity integrate with any task/bug tracking tool? like JIRA?
3) This question is for people who run static code analyzer only. A tool like PC-Lint/Visual Lint can generate XML reports. Can TeamCity be configured to parse these artifacts and generate a build failure?
4) I'm currently evaluating TeamCity right now...there community forum doesnt seem to be very active. For those who pay for support, how is Jetbrains support? Is it good? Atlassian seems to be much better.
TeamCity allows to get build artifacts with a Ant-based pattern. You can specify multiple patterns and set target directory for each pattern. Read more at http://www.jetbrains.net/confluence/display/TCD4/Build+Artifact
There is an integration which allows to link RF-3432 to the Jira issue. More advanced integration may appear in the next release of TC. Read more at http://www.jetbrains.net/confluence/display/TCD4/Mapping+External+Links+in+Comments
Only with custom plugin. Or your build process can send a specific "echo" message which will change build status and description.
OK, I'm JetBrainer. May be we don't response immediately, but we strive to answer forum questions ASAP. Paid customers also have e-mail support.
Hope this helps,
KIR
Disclaimer: I don't work for JetBrains! But I've worked with Pulse and TeamCity in my current job.
Build Artifacts: Yes, TeamCity will export artifacts that remain after a build. You can add define ant-style wildcard patterns to match files (the default pattern matches any files left in the root build directory). These files can be seen from the project view against each individual build.
You can use special service commands in a build script to immediately export artifacts along the way too, I do this for a code complexity tool that generates xml files, for which I've also defined a custom graph.
Bug Tracking: I don't have experience with this, but KIR pointed out some alternatives.
XML Parsing: You can control this with ant. I included a third-party tool called andariel in my build that can run XPaths across xml documents, then used service messages to export the result (in this case a count of methods exceeding a complexity limit) to be displayed in a custom graph.
I believe you could also publish the artifacts, provide TeamCity with an XSL to render the XML, and create an additional tab in your build results to display it (however I have not done this)
Tech Support: I've found the community forums to be pretty good, most questions I've had answered within a day or two by both civilians and Jetbrains employees, and I was using the free 'Professional' version.
I can only imagine that email support will be just as good if not better!
I am a little confused about this question because my use of TeamCity, TC (and I guess the design principles of TC) is to allow the build script (and not TC) to remain the correspondent of build imperatives.
In other words, if you need TeamCity to do something cool, just add that cool stuff in your build script either using an existing task in your build system or write one yourself.
TeamCity supports NAnt, MSBuild, Ant and am sure, any other build platform you can install on on the buildagents.
The only integration I will want TC or any other CI platform to have is source control integration with my choice of SC. The rest of the integration should be controlled by my build script. That way, I only configure my TC once at the beginning of project for each project and then, don't touch it ever again. In contrast, the build can change per version.
So, the indirect answer to your question is Yes, theoretically, through the build script.
Hope this helps.

Resources