Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How Could I run sonar runner in Bamboo

How Could I run sonar runner in Bamboo

Anything we want to do in admin side

How to Install the sonar runner and How could i provide parameter in configuration page

How to configure sonar runner with Bamboo

2 answers

There is a Bamboo plugin for Sonar, but the last I checked, it didn't work with the version of Bamboo we have.

A relatively simple workaround is simply to install the Sonar runner to a directory on the same host as you've installed Bamboo, and to create tasks in Bamboo plans that use the "Script" task type, and use the "Inline" variation. Then, simply construct a command line that specifies the full path to your sonar-runner, along with any command-line properties you want to set.

inline variation means what.

how could i specify the project related properties in sonar runner

any installation and configure guide available to install and configure sonar runner with bamboo

Can you please send me examples of the command line properties this program will accept

The "Script" variation means that you specify the path to a script file to execute. The "Inline" variation means that you enter the complete command line to execute.

Once you've installed sonar-runner on the Bamboo host, you run sonar-runner from Bamboo just like you run any other command-line tool, you just specify the command line and its properties.

For instance, if you've installed sonar-runner in "/sites/sonar-runner-2.0/", then the contents of the "Script Body" text box would look something like this:

/sites/sonar-runner-2.0/bin/sonar-runner \
-Dsonar.scm.enabled=true \
-Dsonar.scm-stats.enabled=true \
-Dsonar.language=java \
-Dsonar.profile=myprofile \
-Dsonar.forceAnalysis=true \
-Dsonar.libraries="../myapp.ear/atglib/*.jar" \
-Dsonar.binaries="gen/main/classes,gen/test/classes" \
-Dsonar.sources="src/main/java,src/test/java" \
-Dsonar.surefire.reportsPath=gen/reports/artifacts/junit \
-Dsonar.cobertura.reportPath=gen/reports/artifacts/coverage/coverage.xml \
-Dsonar.dynamicAnalysis=reuseReports \
-Dsonar.core.codeCoveragePlugin=cobertura \
-Dsonar.projectDescription="Bamboo: group/plan" \
-Dsonar.projectKey=mygroup \
-Dsonar.projectName=myapp \
-Dsonar.branch=mybranch \
-Dsonar.projectVersion=1402 \
-Dsonar.scm.url=scm:svn:svn:<svnpath> \
-Dsonar.login=loginname -Dsonar.password=loginpwd

Are these parameters documented somewhere?

(I wonder why the "link" button isn't enabled while I'm entering this?)

Certainly. In the sonar documentation, like <http://docs.codehaus.org/display/SONAR/Analysis+Parameters> and <http://docs.codehaus.org/display/SONAR/SCM+Activity+Plugin>

Do you mean to say install sonar-scanner on the Bamboo agent?

The two variations of a "Script" are "File" and "Inline". The former specifies a path to a script file, the latter has the command line "inline" in the script definition. You specify project-specific properties on the sonar-runner command line, which you can read about in the sonar-runner documentation, which is not part of Bamboo.

i want to install sonar runner in my machine.bamboo is not installed on my machine

is it possible to install the sonar runner in my machine and view the analysis reports(bamboo has installed in another machine)

I'm assuming you're saying that you want to make sonar-runner run from Bamboo, but run sonar-runner on the remote box. That implies that you'd have a script or inline task using "ssh" to run the remote script.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you