Is it possible to use Bazaar with SonarQube? - sonarqube

I've just installed the latest SonarQube 5.0.1 locally to try it out. The project I'm working with at the moment is hosted in Bazaar (bzr) source control. I looked at the SonarQube list of SCM plugins here:
http://docs.sonarqube.org/display/SONAR/Plugin+Library
Bazaar is not listed. Are there any workarounds or independent projects that I could use to get the scm history information from Bazaar into SonarQube? At this point I am just trying to get a sense of the value of the information to our project, rather than worry about a scalable production-ready solution.

There is currently (2015-04-09) no SCM plugin for Bazaar. If you wish to contribute one, feel free to take inspiration from e.g the SonarQube SCM integration plugin for Git.

Related

How to get Jenkins repository server to host only stable builds?

I have Jenkins version 2.7.1 running on a Windows 7 machine. It is successfully pulling code from a subversion repository and running tests. I have the test jobs set up for the development branch of each project only.
We periodically make stable releases of the projects in jar files with version numbers. I would like to have Jenkins be the repository manager for those stable releases. These are made by hand - There is no Jenkins job making or testing stable releases. The projects do use Maven.
Each stable build is tagged in the subversion repository, so it could be made again on demand if needed.
I downloaded the Maven repository server hoping to make this fit the purpose. I read the documentation that's provided, but it's pretty terse. As I understand it and have it configured now, this appears to have a couple of issues:
If I go to jenkins-ip/plugin/repository/project, it has made directories there that expose the names of all of my projects, which seems undesirable. (Here jenkins-ip is the IP where I access Jenkins on my local network.)
On the other hand, there's nothing but empty directories under these projects, so they're currently useless.
These projects all correspond to the continuous testing of the development branch. There's no apparent way to get the stable builds into the hierarchy. (It doesn't seem efficient to create a job for each stable release...)
Is there anyway to get Jenkins (with this plugin or through another method) to be the repository manager just for the stable builds? I know that I can start a different repository manager like archiva, but it would be ideal to use Jenkins since it's already running and it seems to claim capability for this function now.
To use Maven repository server you have to build the project on Jenkins.
Then the plugin will expose all archived artifacts as maven repo.
Note you need to use a "Maven project" type for it to work (freestyle is not supported)
There are several plugins that will help you manage building from multiple tags, however not all of them work with "Maven project" type.
You could also try Jenkins pipeline (previously "Workflow") or the Job-DSL plugin.
A simplest solution would be to have a build parameter specify the tag name (then checkout e.g. ^/tags/projectname/${tagParam}), but you have to figure out how to trigger the job then.

Release visibility with Jenkins and Nexus

We use Maven, Jenkins and Nexus to build and deploy our software. The problem is that it's difficult for support and all of our people to know if a version is still in the QA staging repository, Beta or Release.
What tools are people using to make visibility of this possible? One option is to create a custom webapp that uses the nexus REST api to make it visible but I would imagine this is a solved problem and I shouldn't have to do that.
Any help or pointers in the right direction would be appreciated.

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

Maven project uploads to Google Code 'Downloads' tab

Note: I am not asking how to use Google Code's SVN repo as a Maven repo :-)
I'm looking for the simplest / most reliable way to automate uploading the built artifacts of a Maven project to a Google Code 'Downloads' tab.
I've found 4 different Google Code Maven plugins that claim to do this, but would appreciate any advice on evaluating them as fit-for-purpose, because they all seem to be in various states of inactivity.
maven-googlecode-plugin (Last commit: Sept 2009. Latest version: 0.0.1-SNAPSHOT)
gcupload-maven-plugin (Last commit: Jan 2009. Latest version: 0.9)
maven-gcu-plugin (Last commit: Oct 2010. Latest version: 1.1)
maven-googlecode (Last commit: Feb 2008. Latest version: 2.0, but labelled 'test')
In addition to these 'level of activity' clues, some of them offer their releases on the 'Downloads' tabs, which might be a good sign from an 'eat your own dogfood' viewpoint; but as these are supposed to be Maven plugins, having them available in Maven Central might inspire more confidence.
Anyone care to comment (perhaps even the owners / committers of these projects) ?
Thanks!
Update:
I have test-driven each one of these in turn and could not get any of them to work as advertised.
Two of them are still configured to upload to a Google Code URL ending in /files, whilst another claimed to work and reported success, but the artifacts did not appear in the 'Downloads' tab. With the last one there appeared to be no released code which could be referenced as a Maven plugin.
I have since emailed each of the project committers to see what can be done.
If you are not averse to looking beyond maven plugins, google code has a SciptedUploads documentation, which seems to provide a python script and an ant task for doing this.
You may want to start reading the comments bottoms-up to see challenges using them, if any.
I got to this page by clicking on the link to "Create a New Download" for my google code project and clicking on the "Tip".
I always wondered why google didn't offer a Maven repository for each project by default.
Digging further, I discovered the following deprecated project:
http://code.google.com/p/google-maven-repository/
It appears the recommendation is to publish releases to Maven Central. This makes a lot of sense, as it certainly simplifies the discovery and integration of your project with other open source.
This movement towards Maven Central is a welcome and increasing trend in Java projects. Large projects like Oracle, Spring and JBoss are now publishing their releases there.

TeamCity Visual Studio plugin with Git

We'd like to implement CI using TeamCity.
We use Git for source control and would like to make use of the "pre tested commits" or "personal builds" feature of TeamCity.
Does anyone have experience with the VS plugin for Teamcity?
As far as I've seen, it only supports Subversion, no word about Git.
Anyone used this setup with any success?
As explained in Pre-tested “Commits” using Git by JoergM, you can emulate a solution similar to the TeamCity6.x "Personal builds on branches", by using personal repos:
.
There is one central Git-repository that only contains pre-tested changes. I call this “Green Repository” because it should only contain changes that lead to green builds.
Every developer pulls from this repository but nobody is allowed to push to it.
Instead everybody has a personal repository (think fork if you were on GitHub). The CI Server watches those personal repositories. After a commit it starts the compile and test. If that was successful it pushes the changes to the Green Repository.
JoergM adds:
The question is whether we will continue using our own solution or switch to the new feature of Teamcity.
So far I can’t see any advantage of the Teamcity feature.
With our solution we are even more flexible in regard of branch design.
This kind of setup is similar to what I described in "What is the cleverest use of source repository that you have ever seen?".
TeamCity 6.5 has new feature: remote run on a branch. It works for Git and Mercurial and does not require IDE, see more here: http://confluence.jetbrains.net/display/TCD65/Branch+Remote+Run+Trigger
Note that support for Git branches has been considerably improved in TeamCity 7.1. In my opinion, this is far better than the personal build feature.
The relevant docs are available here: http://confluence.jetbrains.net/display/TCD7/Working+with+Feature+Branches

Resources