Invoke Standalone Sonar Analysis isn't an option on Jenkins - plugins

I've run into a problem on Jenkins. I have installed the SonarQube plugin for Jenkins(v 1.5.7.0 can't upgrade for project), but when I try to add the build step "Invoke Standalone Sonar Analysis" it isn't an option in the build steps. I've followed a few tutorials and I have installed every SonarQube plugin there is on Jenkins and it still isn't an option.
As far as I have seen no one else has come across this particular issue. Might it have something to do with my Jenkins version? I have seen some tutorials with similar Jenkins versions that are able to add that build step so I feel thats not the issue. Anyone else come across this?
Add build options:

Related

Jenkins and Eclipse Plugin

I am new to Jenkins. How Jenkins is helpful for a developer using Eclipse IDE? In simple, how to set up Continuous Integration with Eclipse and Jenkins?
Please guide me to a link where I can follow steps to set up Eclipse with Jenkins plugin and trigger builds from developer machine.
Thanks in advance!
If you are new to Jenkins Tutorials Point has a good tutorial that will guide you through the basics
http://www.tutorialspoint.com/jenkins/
Jenkins also have a step-by-step guide
Plugin tutorial: https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial
Using Eclipse with Jenkins: https://wiki.jenkins-ci.org/display/JENKINS/Setting+up+Eclipse+to+build+Jenkins
The critical connection you have to have is a build process, using either Gradle or Maven. Once you can build your project from the command line using your build script, you can start to automate it in Jenkins. If you don't have that build process yet, you won't be able to automate it with Jenkins.
You'll also need a source code management (SCM) system, like git or Subversion. In general, you don't want to have to trigger builds manually, you want builds to trigger automatically when new code is checked into git or subversion. Plugins in your SCM or in Jenkins can "watch" your code repository for new checkins, and spawn builds from that.
I just tried something which actually worked for me and I think sharing the recipe will be helpful for the newbies to the DevOps-Development integrated environment.
Drag and drop this plugin (Hudson/Jenkins Mylyn Builds Connector) in your Eclipse workspace and proceed with the installation process with Eclipse marketplace wizard. Once it is installed you will be asked to restart your Eclipse in order to reflect the new changes.
*If there is any issue installing the plugin then it means, plugins that you have are conflicting with the ones attempted to be installed. Once it computes the alternate paths, it pops up the next wizard page. You should be able to see what the conflicts are and choose one of the necessary actions.
Next, in you Eclipse IDE, go to Window ---> Show View ---> Other ---> Mylyn ---> Builds
Select Builds and click Open.
You will now see a Build page in your Eclipse IDE. Just go ahead and click on "Create a new build server". A new window will pop up, select Hudson(supports Jenkins) and click Next.
Copy paste your Jenkins server URL in the Server field and give it a name (Label), click Finish.
You will see your new build server under Builds. Right click on it ---> Plan ---> Open in browser.
This will open your Jenkins dashboard inside the Eclipse IDE. You will be able to perform any operation and trigger a Build pipeline job from here.

Install SonarQube Coverity Plugin

I'm trying to install the coverity plugin for sonarqube and followed all the instructions and executed the mvn command.
the build is successful. however, the widget does not show up after restarting sonarqube.
is there anything I missed? any help is appreciated.
after contakting coverity specialists, it turned out to be a compatibility problem. the coverity plugin for sonarqube works exclusively for sonarcube 5.3 (and not with version 6.1 I used). although the widget eventually showed up, the plugin was not able to get the defects from coverity and probably won't be able to do so at the moment for other versions than sonarqube 5.3.

How do you install Jenkins workflow multibranch plugin

I just set up a vanilla Jenkins (ver. 1.634) instance in EC2 and followed the tutorial for getting the workflow plugin installed. That all worked as expected.
Now I'd like to move on to trying out the multi-branch portion of this plugin. I noticed the tutorial says:
A new Workflow: Multibranch plugin (as of this writing still in beta) offers a better way of versioning your Workflow and managing your project. You need to create a distinct project type, Multibranch Workflow.
First Attempt
Which I took to mean that this plugin doesn't exist at http://updates.jenkins-ci.org/update-center.json but rather some other update center. So after some searching, I wound up on this Jenkins page and changed the update center to http://updates.jenkins-ci.org/experimental/update-center.json After looking at the new set of available plugins, the Workflow: Multibranch plugin was still absent.
Second Attempt
I then proceeded to try packaging the plugin myself by cloning jenkinsci/workflow-plugin repo and running mvn package from the multibranch directory which gave me the workflow-multibranch.hpi plugin that I had been trying to find via the update site. Next, I attempted to install the plugin manually Jenkins -> PluginManager -> Advanced (Tab) -> Upload Plugin.
Jenkins presented me with the following error:
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Failed to install workflow-multibranch plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:487)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
... 5 more
Caused by: java.io.IOException: Dependency workflow-job (1.11-beta-1), branch-api (0.2-beta-5), workflow-cps (1.11-beta-1) doesn't exist
at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:533)
at hudson.PluginManager.dynamicLoad(PluginManager.java:477)
... 6 more
Now, before I end up making a mess of my plugins by manually installing all of these dependent plugins listed in the stacktrace, is there a more direct way to install the Workflow: Multibranch plugin?
Thanks.
You were correct to set the experimental update center, but
After looking at the new set of available plugins, the Workflow: Multibranch plugin was still absent.
probably just means that you needed to click the Update Now button in the Advanced tab to actually fetch the new update center content.
I ended up installing the plugins one at a time until I found a rather odd dependency, Cloudbees. After looking through the list of Jenkins plugins for Cloudbees I found the plugin required to make Workflow: Multibranch appear in the list of available plugins.
CloudBees Free Enterprise Plugins
This plugin installs free enterprise plugins from CloudBees. The following plugins are automatically installed:
Folders: easily organize your jobs
Backup to Cloud: backup your Jenkins into CloudBees cloud
Wasted Minutes: find out if you are short of slaves and need to add capacity to speed up builds
CloudBees Status: find out how much of the free CloudBees Jenkins capacity in the cloud is available for your use
Note: You will be asked to register for a free CloudBees account to use these plugins
(This plugin was formerly known as the CloudBees Plugin Gateway plugin)
Once this plugin was installed and I restarted Jenkins then I was able to install Workflow: Multibranch. Additionally, all of the other Workflow: * plugins had updates available.
Hope this saves someone the hours I spent.

Configure SonarQube Eclipse plugin to visualize the results of analysis from Sonar plugin on Jenkins

I have a question regarding the setup and configuration of SonarQube plugin in Eclipse . We have Sonar plugin version 2.1 installed in Jenkins. It runs analysis every day and I want to configure the Eclipse plugin so that it displays the result from the Jenkins analysis. I don't know if this is possible because I can't find any information about this, the only hope comes from the first answer of this question.
PS. I apologize if there already is an answer to my question, I couldn't find it.
The Sonarqube eclipse plugin is able to present to you the results of your analysis you run with jenkins. The results your are looking for however, are stored in the sonarqube database. So you need to to configure the sonarqube eclipse plugin to connect to the sonarqube-server, not the jenkins-server.
Here is how you do the configuration:
http://docs.codehaus.org/display/SONAR/Configuring+SonarQube+in+Eclipse

CloudBees + PlayFramework + Eclipse

I want to develop and manage my DEV#CloudBees and RUN#CloudBees workspace from Eclipse, for a PlayFramework project, and I will have to work with it from several different PC. I'm using the Cloudbees SVN repository, Jenkins CI solution, database ... everything.
I installed CloudBees and PlayFramework plugins for Eclipse, created my CloudBees account, SVN repository, project, Jenkins Job and database. I've created my Play project, eclipsified it.
I understand and I have tested each component of my targeted working environment but I didn't manage to make them work smoothly together.
1- I've seen some Play modules for CloudBees but it is only for command-line use. Is there a nice Eclipse plugin wrapper for this ?
2- I have some issues writing the build.xml, especially when referencing the PlayFramework libs, because I can not use the local installation as it won't work on Jenkins.
3- How can I deploy to RUN#CloudBees from Eclipse ? If i use the CloudBees plugin, it doesn't package the PlayFramework libs.
4- How can I use the testing features of Play to be integrated in Jenkins ?
I have a lot of questions but it is enough for now :) By the way, PlayFramework is awesome and CloudBees a life-saving work environment.
Thank you for your help.
Contact the support, they are really helpful..and fast!
they do have a plugin for Jenkins, ask to get it installed on your server..I use the command
play auto-test
and it works fine. You'll need some code to check for failures depending on the .failures files. check this link
I received a very quick and efficient answer from Cloudbees support.
It confirms what mericano1 and Ryan said (thanks to them).
The CloudBees Jenkins service let users install some customization plugins like the Play! Framework one !
After adding it to the core configuration, you can add a new build step "Play!" in your job configuration and set the Play! commands you need. For example "clean", then "deps --sync" and finally "auto-test". You can also add the war -o toto.war if you need the binary.
You can check the "Play! auto-test reports" checkbox. You'll have an additional icon "Play! Test Result" in the left menu of the build result page to watch the ... Play test result page (unbelieavable :)).
Still in the job configuration, you can check the "Deploy to CloudBees" features. I didn't tried but I think the Play! libs issues wouldn't be resolved. So, add the cloudbees 0.2.2 plugin in your Play! project dependencies.yml, and you can add the bees:app:deploy command in your build step.
For Eclipse, the CloudBees plugin is fully functionnal, once you have configurated your Jenkins job. But you should stay with the Play! process to develop locally and not the Run DEV#/CloudBees Local.
1) The cloudbees module is only for the command-line. There is no Eclipse plugin (that I know of). However, the command-line is really simple play bees:app:deploy
2) Not sure here
3) Deploying Play Framework Apps is a bit different from deploying J2EE (because of the necessary play war command), thus deploying a Play app to Cloudbees from Eclipse might not be possible. However, see 1).
4) I think there is a Play plugin for Jenkins. I have never used it on/off Cloudbees.
OK, so I provided some help on questions 2 and 4, and unfortunately, the answers may not have been what you hoped. I suggest switching to command-line when it is time to deploy.
In eclipse click on external tools menu and create a new command as noted by Ryan in 1).
then you can simply click on the external tool icon.