Jenkins and Sonar - How to use Sonar Runner with Linux (Because it only has a .bat executer) - linux

I have a distant linux system with a Tomcat containing Jenkins and the Sonar server (v 3.7.4). I am also using the Sonar Runner (v 2.1), but can I really use it in a linux environnement ? I mean, the bin repository only contains a .bat file, no .sh.
So if in Jenkins I set the SONAR_RUNNER_HOME to the path of my sonar runner install repository on linux, is it gonna work ? Because obviously if I want to run the .bat file myself to do test it (after the creation of sonar-project.properties file), well, I can't.
I didn't find anything about that on Google, as if there was no problem about it.

You can use sonar-runner which is shell script (it's marked as a Unix executable).
However, please note that Sonar 3.7.4 is really old (more than 3 years old). So I highly suggest to upgrade to latest LTS (5.6.6) and you will benefit also of the Jenkins plugin (https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Jenkins)

Related

How to run cucumber test cases in Linux centos without using Intellij

I have cucumber test cases with gradle build and can run them through intellij in windows 10. ( able to run .bat file by picking the path from intellij)
Question. ## Please help me on how to run a specific cucumber test scenario in Linux centos? ##
Is there a way of running the cucumber test scenario by a file in Linux Centos?
You can run cucumber from the command prompt. How you do this will depend on what language version for cucumber you are using.
Have a look at https://cucumber.io/docs to find info for your specific platform.

What image to use in .gitlab-ci.yml file for running fastlane in gitlab-ci?

I want to integrate my fastlane into gitlab-ci and I do not know what image I will use.
Unfortunately iOS requires the code to be compiled on OSX
If you have access to a mac you can install a GitLab Runner and register it to your GitLab repository.
When setting up this runner you should give it a tag name (something like osx) and when it comes to selecting the executor, you should choose shell(so the jobs will be run directly on your mac machine).
After you have a mac runner up and running, you should also make sure you have all the tools that you normally are using like fastlane, xcode and Android Studio setup.
Now in With this setup you don't need to provide any image to your ci job. But rather give it the tag name you gave your mac runner.

How to auto run jar file in Linux (fedora, ubuntu) such as service on Windows

I made executable jar file for release to customers.
For Windows, I made .exe setup file.
if exe file executed, made jar file installed and auto run on service.
But, I don't know way for release linux like Windows.
I want to setup and then auto run in linux such as made for windows exe file.
Anyone know how to do this?
I found informations like packaging but, these things do not seem to be what I want.
You can create a custom RPM package which install your executable jar. You can also add steps for installing systemd unit file(init file if on older Linux system) which will run your jar as service.
These RPMs uses script which specifies what to do while installation. Just add the steps to copy jar to /bin directory and steps to create/install/enable systemd unit file onto system.

Is separate set of selenium jar files needed for linux os?

I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed.
I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully..
I don't know where the actual problem is..? Please help me on this
There is few things which can effects scripts in Linux environment
1st is batch file you are using
refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :)
If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

Does sonarqube 5.1 support ARM?

I'm trying to install sonarqube in a Synology Diskstation DS112j with an ARM Processor.
In sonarqube-5.1/bin folder there's only batch files for linux-x86-32/64 bits so I can't start sonarqube due to this error
/var/services/sonarqube-5.1/bin/linux-x86-32/./wrapper: line 1: syntax error: unexpected "("
Failed to start SonarQube.
Is there any sonar.sh for ARM or any workaround to install sonarqube in an ARM diskstation?
SonarQube does not officialy support ARM processors, that's why there's no sonar.sh script for ARM.
What's more, I know some guys tried to make it work, but they failed.
Thread 1
Thread 2
Still, you can try again and write a simple script so start SQ:
#! /bin/sh
java -jar lib/sonar-application-5.1.jar
Just put this script in the SQ intallation root directory, run it, et voilĂ !
(if SonarQube starts but has other errors, please open another question)
In the past (cf. post), I succeed to run SonarQube v3.7.3 on a Qnap 219 : CPU armv5tel.
Using linux-x86-32 script, but with a Java Service Wrapper lib override : Linux armel
I can retry and write more detailed process if not trivial ...
SonarQube Scanner now (3.1) provides a ANY release, which supports running in native java installation. The bin/sonnar-scanner file is a shell script which works just fine.
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner

Resources