Im trying to analyse swift app using SonarQube. followed the instructions from here
Im able to run the sonarqube server and running sonar-scanner while running it I'm getting this error
com.sonarsource.A.A.B.A: No license for swift
I'm using this plug in, backelite-sonar-swift-plugin-0.2.4.jar i feel this plug in is free and we can use it. correct me it I'm wrong.
What I did was:
Download Sonarqube LTS version (https://www.sonarqube.org/downloads/)
Download and install dependencies and Sonar-Swift from https://github.com/Backelite/sonar-swift (including sonar-scanner)
Download sonar-project.properties (https://gist.github.com/Edudjr/db51907068ea76b116d11d9a9b13f05f#file-sonar-project-properties) and configure it according to your project. Place it in your project root folder.
Download run-sonar-swift.sh (https://gist.github.com/Edudjr/79a2379842357c33709aecf040d9ae77#file-run-sonar-swift-sh), place it in somewhere in your mac and add to path (/etc/paths). I did a small change in the script because oclint was not running properly.
Start your Sonarqube server (sonar.sh console in sonar folder) and run run-sonar-swift.sh in your project root folder. You should be done.
Manual Installation
In the page dedicated to the plugin you want to install (ex: for Python : SonarPython), click on the "Download" link of the version compatible with your SonarQube version.
Upload the downloaded jar file in your SonarQube Server and put it in the directory : $SONARQUBE_HOME/extensions/plugins.
If another version of the same plugin is already there, you need to remove it, since only one version of a given plugin may be available in the extensions/plugins directory.
Once done, you will need to restart your SonarQube Server.
https://docs.sonarqube.org/display/SONAR/Installing+a+Plugin
Backelite Sonar-Swift last release:
https://github.com/Backelite/sonar-swift/releases
Related
I need to configure my soap ui project through jenkins using windows batch command but the soap project is not executing the cases.
Below command line is working from command prompt and running the project but same line is not working in the jenkins (cmd)
cd C:\Program Files\SmartBear\SoapUI-5.2.1\bin
testrunner.bat "localprojecpath\soapProjectFile.xml"
In the jenkins it shows loading--->>
but project is not running yet so need some one help on this.
It looks like what you are doing is fine. But it seems like you are using some imported JAR files, that hasn't been added to the free version of SoapUI used on your build server.
Failed to load class "org.slf4j.impl.StaticLoggerBinder"
Whatever JAR you've included when using this class, should also be added to the SoapUI installations on each and every one of your build servers.
In this build inside docker (on travis-ci), sonar-scanner-2.9.0.670 throws a java.lang.ExceptionInInitializerError:
ERROR: Error during SonarQube Scanner execution
java.lang.ExceptionInInitializerError
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:166)enter code here
Build log here (see line 4660):
https://travis-ci.org/laristra/flecsi/jobs/213157927#L4660
Sonarqube got put into a ubuntu:latest container here:
https://github.com/laristra/flecsi-buildenv/blob/sonarqube/ubuntu#L14
You are working on a C++ project: https://github.com/laristra/flecsi.
You are building it with Travis-CI.
You want to analyze it on SonarQube.com.
You don't need to download any SonarQube Scanner nor set up any SonarQube inside a Docker.
Please:
follow the Get Started guide
, and look at the sample C/C++ project to understand how to trigger a SonarQube analysis using our Travis Addon
It automatically downloads and installs the SonarQube Scanner
It automatically downloads and installs the C/C++ Build Wrapper
It automatically configure everything to point to SonarQube.com
It turned out the problem was Oracle's JDK using openjdk-8-jdk fixed the issue (inside docker).
Instead of using this Jenkins plugin https://github.com/jenkinsci/quality-gates-plugin, I am trying to use a forked version of it: https://github.com/sarg/quality-gates-plugin that has some extra functionality.
I've downloaded the forked version as a .zip file. I changed the termination of the file from .zip to .hpi. Then, I added it to Jenkins's plugins directory.
This should have installed the plugin, right?
I am looking at installed plugins, but I can't find Quality Gates Plugin.
Do I need to do something else to install the plugin?
You have to build the plugin before uploading / installing the plugin in Jenkins. You do this by unzipping the downloaded zip file. Then, using your favorite terminal or command prompt that has maven on the path, you run mvn install. If successful, it will build the .hpi file for the plugin and can be found in the target folder, e.g. target/pluginname.hpi
For more info on plugin development and building plugins, look here.
I have built a new "Hello World" plugin for Jenkins and I was able to upload it onto Jenkins and it works successfully. I am now trying to make change to the plugin and debug it on Jenkins.
Note:
My Jenkins is deployed in my local tomcat, i build the hpi file and copy it to jenkins plugins folder, it works.
Now i want to ask how can i debug my plugin code? Suggestions with any IDE is welcome.
I also have questions about:
do i need to create a project for jenkins source in my IDE and develop my plugin base on it?
Currently i only create a project for the plugin, build a hpi file and put it to Jenkins.
I am not sure if this step is correct.
Thanks in advance!
I imagine you ran
mvn package
to create your package
To debug you can do
mvnDebug hpi:run
and this will copy all the dependencies down (rather than in your jenkins install) and run it in place
If you are using an IDE then this can be done from within it.
More help can be found in the plugin tutorial
Follow the tutorial to set MAVEN_OPTS, and using IntelliJ to add a Jetty Server to point the port to it.
execute from cmd:
mvn clean
set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n
mvn hpi:run
add a debug local Jetty Server from intelliJ and point it to port 8000 (port number is specified in above cmd)
In case of IntelliJ IDEA the easiest way is to use maven's Run/Debug configuration.
Just add hpi:run in "Command line" filed and start Debug as usual.
When the console says that your "Jenkins is fully up and running", open a browser and go to http://localhost:8080/jenkins/ and your code will stopped at break point (if any).
I came across Nimble yesterday, but couldn't get past Step 1, configuring BuildConfig.groovy to find the Nimble's remote repository.
My BuildConfig.groovy file is one line:
grails.plugin.repos.discovery.intient="http://intient.com/downloads/grails/
Here is the message I get when running grails install-plugin nimble 0.2:
Welcome to Grails 1.1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /opt/dev/sdks/grails-1.1.1
Base Directory: /home/wraith/dev/source/demo
Running script /opt/dev/sdks/grails-1.1.1/scripts/InstallPlugin.groovy
Environment set to development
No authentication for svn repo at intient ...
Reading remote plugin list ...
Reading remote plugin list ...
Reading remote plugin list ...
Plugin 'nimble' was not found in repository. If it is not stored in a configured repository you will need to install it manually. Type 'grails list-plugins' to find out what plugins are available.
This is the first time I have tried to install a plugin not in the official repository. What is the best way to narrow down if it is a problem at Intient.com or with my configuration?
Follow these instructions with the following modifications:
Step 1 is correct
Instead of using the remote repository, download the zipped plugin
Move the plugin to ~/dev/plugins
grails install-plugin ~/dev/plugins/grails-nimble-0.2.zip
Steps 3-5 are correct
We were performing some maintenance on intient.com and the load balancer wasn't providing this content for the last 12 hours or so (oops!).
Should be sorted now but the steps Wraith Monster gave above work for a manual install as well.
Once Grails 1.2 proper hits Nimble will be part of the official plugin repo and we won't need to worry about this at all.
you could always download the zip file for the plugin and install it manually
Download source code from http://github.com/intient/nimble
Unzip under your plugins directory of your project (usually under ${USER_HOME}/.grails/<grails-version>/projects/<myproject>/plugins)
Rename the extracted folder into "nimble-0.2"
Remove from BuildConfig the line grails.plugin.repos.discovery.intient="http://intient.com/downloads/grails/"
Edit the file application.properties of your project and add the line plugins.nimble=0.2
If not installed under your project, you should install the plugins : shiro (version 1.0-SNAPSHOT at least) and mail (>0.6). (run command grails install-plugin <pluginName> <version>)
Start directly from Step 3
It should work (at least, it worked for me). Good luck