Sonar Runner OS X - ios

I'm currently looking at how to start using SonarQube as part of a Jenkins build process for building mobile apps.
Because we are building mobile apps our Jenkins runs on OS X so we can support iOS.
We have a Sonar server running on a windows box elsewhere on the network so all we need to do from the OS X box is send the files that relate to the analysis.
What is the best way of doing that? Using the Sonar Runner jar? If so where is the best place to source that from?
EDIT
I should have added that we are using Jenkins Workflow in our build scripts, this means it isn't easy for us to use plugins that don't support the simple build step, as I believe Sonar doesn't.
This is why we really need information on how to do Sonar analysis from the command line.
EDIT
I appreciate that Sonar uses Java but I am definitely seeing different behaviour on OS X as opposed to Windows.
On Windows the Sonar Runner script works, whereas on OS X it times out, I'm able to verify it isn't a network issue since I can get to the Sonar server though the browser.

Regarding the OS, it's all Java code, so OS is a non-issue.
Regarding using Jenkins, take a look at SonarQube Scanner for Jenkins. It will let you configure your server information and add analysis as a Build Step to a job.
Short of that, you can run an analysis from the command line by installing SonarQube Scanner, cd-ing to your project root and invoking sonar-runner.

Related

How to Integrate SonarQube with QuickBuild?

We are currently using GitLab and QuickBuild for our Android Projects.
I have to integrate Sonarqube to have a pre check before every build.
I'm not able to get much information for quickbuild as most of the documentation is for Jenkins.
I can see that we can create steps in quickbuild and I would have to add one more step for sonar check and execute the sonar command.
But still I'm not very sure what is the best practice?
Where should I run the Sonar Server?
Where to add the sonar configuration files?
Any good documentation available?
Should I run the Sonar check on GitLab or QuickBuild? (Our build server is QuickBuild so it looks the better option)
Ideally you should run sonar server on separate machine or you can use the same server on which quickbuild is running (depending upon java versions)
You can place sonar configuration file either in project directory or you can store it at any central location.
No official documentation for sonar and quickbuild integration.
Run sonar check on Buildserver.
We chose to do the SonarQube check inside the Maven build (that runs on Quickbuild). A Maven plugin is available. If you use Gradle, this might do as well.

run sonarQube via jenkins Task 'my-task' does not exist. Please use 'list' task to see all available tasks

I've got a server in work which has sonarQube, Gitlab and jenkins running side by side with Maven also on the box. I have also a project on this box i wish to test with sonarqube (located on this same box in /home/{user}/live/{sitename}/htdocs). I created a job in sonarqube, the only options i had where to call it something and I've no idea how this links to the actual project or where it is expecting to find the project to scan. in jenkins I added build step for sonarqube, again no option on where to find the code. i ran it anyway and to no surprise it failed asking me to use list to see all available, not being funny but where do i do this?
So I have 2 questions really:
where is sonarQube looking for this code, i presume symbolic links are good in this location to the actual code right?
where do i find and use this list command? is this in jenkins or sonarqube?
sonarqube jankins and gitlab are all accessible on our intranet with different default ports (8080, 8008 and 9000) i have the sonarqube scanner plugin on jenkins and it is using maven? Does anyone know of any good tutorials to setup this kind of scenario?
thanks
Craig
Configure your current Job and set below.
Under Build->Execute SonarQube Scanner
Task to run : leave it blank
Path to project properties: Specify your sonar project properties file
path
Before doing above changes make sure that below configurations are set
Jenkins->Manage Jenkins->Sonar Servers
Name:Sonarqube
Server URL: http://localhost:9000/sonarqube
Server authentication token: Generate in SonarQube in specify here
Jenkins->Manage Jenkins->Global Tool Configuration->SonarQube Scanner
SonarQube Scanner installations:
Name: SonarScanner
Install automatically: Tick checkbox
Install from Maven Center: Choose compatible SonarScanner version
I was able to get this working in the end but after upgrading sonarqube we decided to use the new pipelines feature, this took a while to configure but we are now able to do code analysis on our builds, see this link for details

Code review plugin running tests at source code level

I am building a Devops pipeline , where in I am trying to include an extra code review plugin which supports C, C++ and C#. In my pipeline, I already have Sonarqube 6.5 running and it also has the FXCop plugin activated.
So, Sonarqube runs tests at source code level and FXCop runs tests at binary level. Now, I am trying to find out another code review plugin which could be plugged to Sonarqube (Plugin has to run tests at source code level, not binary level).
I thought of choosing StyleCop but it has to be downloaded in my laptop. So, I had to neglect that.
Tried using Source Meter, which is another plugin that runs review tests at source code level but it is not compatible with 6.5 version of Sonarqube (only supported till Sonarqube 4.5 version).
And now, I am running out of plugins which could do the job. Could anyone suggest a plugin that could both be plugged with Sonarqube 6.5 and run source code level review tests?
NOTE: (Should support C, C++ and C#)
You could try SonarQube plug-in for PVS-Studio static source code analyzer for C/C++/C#.

Alternatives for QC

In my project we are using QC to execute our test cases(QTP), moving forward we would be eliminating QC (for cost reasons).
As far as I explored MSBuild & Jenkins, they would be suitable.
But MSBuild will trigger the execution when a new build pushed to the repository. Also it will automatically test on the latest build.
Is there any other CI tool available to execute test cases through QTP?
I will be executing automation once in a release. Also we install our application by manual since it requires lots of configuration.
Take a look at HP Application Automation Tools.
This plugin basically replaces the need for QC, and is developed by HP.
Create a Jenkins job using this plugin on the same Jenkins installation used to build your code, then you can configure your job to run your tests as soon the code is available (e.g. on a nightly basis).
See here for a helpful guide on how to implement a simple Jenkins job using this plugin.
They also host the code on Github, which is very useful if you need to change the behavior of the plugin to suit your needs.

Run Delphi program on OS X from MSBuild

Most of our automated builds runs on Windows, but OS X is needed for generating the help file index and code signing. Is there a way to run a Delphi program on OS X from MSBuild? It's very simple to do this from within the IDE, but I'd like to automate it.
For automation with multi-platform build steps, I highly recommend a CI tool like Hudson / Jenkins.
You can assign a build task to a specific agent which is running on OSX. Components of the build will be created on the correct operating system.
If your target is full build automation, CI tools are worth a look or two.

Resources