Sonar JIRA Plugin: "Link to JIRA" is missing - jira

After installing the Sonar JIRA plugin and restarting the Sonar server, I have run an analysis with the following properties configured in the Sonar Ant task:
sonar.jira.url (no HTTPS used)
sonar.jira.login.secured
sonar.jira.password.secured
sonar.jira.url.param (a JIRA filter)
sonar.jira.project.key (the project key that is also used as prefix in JIRA issue keys)
The JIRA widget shows results for the configured JIRA filter, but the item "Link to JIRA" is missing from the "More actions" pop-up menu. I have tried this with Sonar 3.0, 3.4.1 and 3.5.
What could be wrong?

If you want to be able to link issues to JIRA, then you must specify all your properties in Sonar Web UI, not in your Ant build script.
Indeed, properties set on project files (may they be POM / sonar-project.properties / build.xml files) are not stored in the DB, so the UI can't retrieve this information and therefore won't display the link.

On the dashboards, click into a project, on the right up corner, there is a Configuration dropdown menu, on the setting opiton, you can find the JIRA setting. there you will be able to see the JIRA project key input box.

Related

Link from Jenkins Pipeline page to SonarQube

I've set up a multi-branch pipeline in Jenkins which performs a SonarQube analysis using the withSonarQubeEnv() step and the sonar:sonar Maven goal.
This works fine, and the analysis results do show up in SonarQube.
What I'm missing (compared to the traditional non-pipeline Jenkins integration) is a clickable link on the Jenkins build page which will open the analysis results in SonarQube.
There is a small SonarQube icon next to every build in the left panel, but this icon is not clickable.
Is there any configuration switch that will produce a clickable link, or is this simply a missing feature?
As far as I know Once the job is complete, the plugin will detect that a SonarQube analysis was made during the build and display a badge and a widget on the job page with a link to the SonarQube dashboard as well as quality gate status.
Please refer this and verify your configurations.
If this is happening to you, verify that the test is actually running if not, verify your configuration.
You are probably looking for the SonarQube link on the build job page (for example job/foo/1/). However the link is on the project pate (that is job/foo). There you will find one link on the menu to the left and a SonarQube Quality Gate widget in the bottom center.
Menu
Widget

Jenkins Plugin that Aggregates/Summarizes Reports for a Build

I'm searching for an existing Jenkins plugin or something close to it. This is my ideal:
Provides a link to the side on a build page
Clicking the link will open up a page with a summary of the various reports (ideally configured)
Reports could include:
Cobertura
Surefire
Static analysis
Security
Other
There will be links to the full report pages from the other plugins as well as a few columns providing basic info like Status, Details, and another column or two maybe
This seems basic enough that I would think it already exists, but I haven't found anything yet.
The existing Cobertura, JUnit and various Static Analysis plugins for Jenkins will already add links to each build page, pointing to a summary of the results of each tool.
For other tools, you can use the HTML Publisher plugin to add more links to each build page.
But I don't believe there is another plugin which will build some sort of summary from a list of arbitrary reports.

How enable JIRA service on Gitlab Project services tab?

I'm trying to integrate JIRA issue tracker with Gitlab and following instructions from official docs.
My `/etc/gitlab/gitlab.rb' configuration file looks like
gitlab_rails['issues_tracker_jira'] = true
gitlab_rails['issues_tracker_jira_title'] = "Atlassian Jira"
gitlab_rails['issues_tracker_jira_project_url'] =
"http://localhost:7777/issues/?jql=project=:issues_tracker_id"
gitlab_rails['issues_tracker_jira_issues_url'] =
"http://localhost:7777/browse/:id"
gitlab_rails['issues_tracker_jira_new_issue_url'] =
"http://localhost:7777/secure/CreateIssue.jspa"
JIRA web app installed and running at localhost:7777
Modifying gitlab.rb file as showed above enabled JIRA in Setting tab as expected but services tab doesn't contain JIRA. Of course, I choose Atlassian Jira in Features, specified jira project name (same as gitlab project name) saved changes and in Project services tab saw Assembla, Atlassian Bamboo and others but didn't see JIRA. What I'm doing wrong?
UPDATE
As VonC pointed out, CE doesn't support JIRA fully. But, according to CE and EE comparison, CE still supports JIRA partially, in particular, mention JIRA ticket from Gitlab. As I understand, I still able to point issues to my JIRA instance and add issues in JIRA but I have to manually create project in JIRA and gitlab project name must be the same with the JIRA project name, am I right? I think so, because when I do it everything works the ony problem is log-in-problem described below.
Also, linking to JIRA doesn't work until I'm not logged in to JIRA. Is there any way to provide JIRA credentials to Gitlab CE?
We are using gitlab-ce 8.2.2-ce.0 and JIRA 6.4.11. I didn't have to configure anything in gitlab.rb.
First, configure the template so you don't have to do everything for each new project:
http://localhost:7777/admin/application_settings/services
Open "JIRA" and exactly set this (including the ##-stuff - don't replace it):
Project url: http://localhost:7777/browse/#project-name#
Issues url: http://localhost:7777/browse/:id
New issue url: http://localhost:7777/secure/CreateIssue!default.jspa?selectedProjectId=#project-id#
Then for each project, go to "Project > Settings > Services", activate JIRA and adapt the settings to use the correct project name and ID.
gitlab project name must be the same with the JIRA project name, am I right?
No, this is not necessary.

Sonar JIRA Plugin : automatically create / resolve issues

I installed the JIRA plugin in Sonar for a project.
I can successfully link between issues in Sonar and issues in JIRA using Sonar's web interface and the "Link to Jira Issue" button.
The project is mainly a Java project and I use gradle to build and gradle's sonar-runner plugin to do a sonar analysis.
Is it possible to have the JIRA issues created ( or solved ) automatically whenever I'm running an analysis , so I don't have to click on "Link to Jira Issue" for every issue ( there's approx 100 issues ).
Any help is greatly appreciated.
Cheers !
No, it's not possible to automatically create issues in JIRA. What is your use case / process because I don't think that is worth opening a JIRA ticket for each issue (code formatting for instance)? From my point of view, you should only link important SonarQube's issues to JIRA to make them appear in your release notes for example.
Note also that there's a review workflow available in SonarQube: http://docs.sonarqube.org/display/SONAR/Reviewing+Issues

Jenkins manual Trigger for successful build

I need help with Jenkins.
I want trigger over an button in the already successful builded 'build' page (where the testresults, artefacts etc. are listed) one target in an ant script.
Is that possible over an plugin or do I have there to do more?
This is the closest I can see you can get at the moment.
A combination of the Jenkins Batch Task Plugin:
This plugin adds batch tasks that are not regularly executed to
projects, such as releases, integration, archiving, etc. In this way,
anyone in the project team can execute them in a way that leaves a
record.
and Sidebar-Link Plugin:
This simple plugin adds an Additional Sidebar Links section in the
main Jenkins configuration page, with settings for link URLs, texts
and icons. These links will be shown in the top-level Jenkins pages
(main page, user list, build history, My Projects and other project
view tabs). Sidebar links for particular jobs may also be added in the
job configuration pages.
You can use the Sidebar-Link Plugin to add these to the project page, but it doesn't appear to support adding it to the build page as of yet - might be worth raising a JIRA ticket and requesting this as it was part of the original ticket.
In the Batch Task Plugin you can define a task - that might well be an Ant invocation - this example is called 'release'.
Then you can run the task from the web interface:
And records of these post-build tasks are kept and accessible:

Resources