I am looking for a documentation around Integrating JIRA with Jenkins. All I am trying to do is display the Jenkins build status in a dashboard in JIRA. I have installed Jenkins Plugin for JIRA and JIRA Plugin for Jenkins and went through the Atlassian marvelution documentation but it is not clear how to configure the Jobs.
It will be nice if I could get some instructions around integrating the Jobs to JIRA and how to configure the jobs to show up in JIRA dashboard/ Activity page for a JIRA Issue
The first step is try to configure JIRA and JENKINS server each working individually.
And then install the following Plugins in JENKINS and JIRA Separately
1) Jira Issue Updater:- This plugin can update Jira issues by changing their workflow status and adding comments. 1.11
2) JIRA plugin:- This plugin integrates Jenkins to Atlassian JIRA. 1.39
3) JIRA Plugin for Jenkins:- This plugin implements the Application Link API to support integration with Atlassian JIRA 1.5.3
4) JiraTestResultReporter plugin:- This plugin creates issues in Jira for failed unit tests.
Following add-on in JIRA server:-
1) JIRA Plugin to integrate Jenkins CI Version: 1.5.3 Vendor: Marvelution Add-on key: com.marvelution.jira.plugins.jenkins
2) JIRA Plugin to integrate Hudson CI Version: 5.0.4 Vendor: Marvelution Add-on key: com.marvelution.jira.plugins.hudson
After installing the above plugins in Jenkins go to Global configuration under Manage Jenkins and add JIRA site name.
Similarly go to JIRA Administration, Hudson/Jenkins, Servers, Add Server, configure there your Jenkins server.
Related
I want to create a new Jira issue after everytime Jenkins jobs running no matter the result is passed or failed. But my setting was no effect in Jenkins. It only created a Jira issue for the first time, then, it only added a comment to the old JIRA issue after running job finished.
Here is my setting:
"JIRA: Create issue" in Jenkins
Only updated JIRA Comments in the old Jira issue
BTW: Other related functions are OK. Like: triggered Jenkins job after Jira issue status changed or added comments to jira after running job.
Versions:
Jenkins ver. 2.32.2
JIRA plugin: 2.5
JIRA Integration for Jenkins: 3.1.3
Jira Issue Updater: 1.18
JIRA Pipeline Steps: 1.3.1
JiraTestResultReporter plugin 2.0.6
JIRA Trigger Plugin: 0.5.1
jira-ext Plugin:0.7
JIRA: 7.5.0
Thanks in advance!
We have Jenkins with a couple of plugins. Including the Groovy-Pipeline plugin. Problem is that Jenkins sometime does not run and we get the message:
Sep 12, 2017 3:33:16 PM hudson.ExpressionFactory2$JexlExpression evaluate
WARNING: Caught exception evaluating: job.buildHealthReports in /. Reason: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
Caused by: java.lang.LinkageError: loader (instance of org/jenkinsci/plugins/workflow/cps/CpsGroovyShell$CleanGroovyClassLoader): attempted duplicate class definition for name: "lib/lib"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
When I disable the plugin the error goes away.
Notable is that it seems to handle around "job.buildHealthReports" and that the problem is "lib/lib". I assume some duplicate library loading...
Installed plugins:
Enabled Name ↓ Version Previously installed version
Pinned Uninstall Allure Jenkins Plugin This plugin
integrates Allure reporting tool into Jenkins.
2.22
AnsiColor Adds ANSI coloring to the Console Output
0.5.2
Ant Plugin Adds Apache Ant support to Jenkins
1.7
Authentication Tokens API Plugin This plugin provides an API for converting credentials into authentication tokens in Jenkins.
1.3 Autofavorite for Blue Ocean Automatically favorites multibranch pipeline jobs when user is the author
1.0.0
Bitbucket Branch Source Plugin Allows to use Bitbucket Cloud as a source for multi-branch projects. It also provides the required
connectors for Bitbucket Cloud Team Folder (also known as repositories
auto-discovering).
2.2.3 Bitbucket Pipeline for Blue Ocean BlueOcean Bitbucket pipeline creator
1.2.0
Blue Ocean BlueOcean Aggregator
1.2.0
Blue Ocean Pipeline Editor The Blue Ocean Pipeline Editor is the simplest way for anyone wanting to get started with creating Pipelines
in Jenkins
1.2.0
bouncycastle API Plugin This plugin provides an stable API to Bouncy Castle related tasks.
2.16.2
Branch API Plugin This plugin provides an API for multiple branch based projects.
2.0.11
Build Monitor View Provides a highly visible view of the status of selected Jenkins jobs. It easily accommodates different computer
screen sizes and is ideal as an Extreme Feedback Device to be
displayed on a screen on your office wall.
1.12+build.201704111018
Common API for Blue Ocean This plugin is a part of Blue Ocean UI
1.2.0
Config API for Blue Ocean BlueOcean Analytics Tools plugin
1.2.0
Config File Provider Plugin Ability to provide configuration files (e.g. settings.xml for maven, XML, groovy, custom files,...)
loaded through the UI which will be copied to the job workspace.
2.16.3 Credentials Binding Plugin Allows credentials to be bound to environment variables for use from miscellaneous build steps.
1.13
Credentials Plugin This plugin allows you to store credentials in Jenkins.
2.1.15
Cucumber json test reporting. This plugin understands cucumber json files and converts them to Jenkins TestCase so they can be seen
in the standard test reports.
0.9.7 Cucumber reports This project provides pretty html reports for Cucumber. It works by generating html from the cucumber json
report formatter. Can be used anywhere a json report is generated
(Java, Ruby, JavaScript and other implementations).
3.10.1
Dashboard for Blue Ocean Blue Ocean Dashboard
1.2.0
Display URL API Provides the DisplayURLProvider extension point to provide alternate URLs for use in notifications
2.0
Display URL for Blue Ocean This plugin generates BlueOcean specific URLs for the Display URL plugin.
2.1.0
Docker Commons Plugin Provides the common shared functionality for various Docker-related plugins.
1.8
Docker Pipeline Build and use Docker containers from pipelines.
1.12
Durable Task Plugin Library offering an extension point for processes which can run outside of Jenkins yet be monitored.
1.14
Events API for Blue Ocean Blue Ocean Events
1.2.0
External Monitor Job Type Plugin Adds the ability to monitor the result of externally executed jobs
1.7 Favorite This plugin allows users to favorite a job.
2.3.0
Folders Plugin This plugin allows users to create "folders" to organize jobs. Users can define custom taxonomies (like by project
type, organization type etc). Folders are nestable and you can define
views within folders. Maintained by CloudBees, Inc.
6.1.2
Git client plugin Utility plugin for Git support in Jenkins
2.5.0
Git Pipeline for Blue Ocean BlueOcean Git SCM pipeline creator
1.2.0
Git plugin This plugin integrates Git with Jenkins.
3.5.1
GIT server Plugin Allows Jenkins to act as a Git server.
1.7 GitHub API Plugin This plugin provides GitHub API for other plugins.
1.86
GitHub Branch Source Plugin Multibranch projects and organization folders from GitHub. Maintained by CloudBees, Inc.
2.2.3
GitHub Organization Folder Plugin The functionality that was provided by this plugin has been moved to the GitHub Branch Source
plugin. You can safely delete this plugin once there are no plugins
that depend on this plugin installed.
1.6 GitHub Pipeline for Blue Ocean BlueOcean GitHub organization pipeline creator
1.2.0
GitHub plugin This plugin integrates GitHub to Jenkins.
1.28.0
Green Balls Because green is better than blue! For color blind support configure user property.
1.15 Hidden Parameter plugin
0.0.4 HipChat Plugin This plugin is a HipChat notifier that can publish build status to HipChat rooms.
2.1.1 HTML Publisher plugin This plugin publishes HTML reports.
1.14 i18n for Blue Ocean Blue Ocean Internationalization (i18n) Plugin. This plugin is a part of the Blue Ocean Plugin set.
1.2.0
Icon Shim Plugin Allows plugins make full use of the layout tag when running on newer versions of Jenkins, while still
being compatible with older versions.
2.0.3 Jackson 2 API Plugin This plugin exposes the Jackson 2 JSON APIs to other Jenkins plugins.
2.7.3 Javadoc Plugin
1.4 JavaScript GUI Lib: ACE Editor bundle plugin JavaScript GUI Lib: ACE Editor bundle plugin.
1.1 JavaScript GUI Lib: Handlebars bundle plugin JavaScript GUI Lib: Handlebars bundle plugin.
1.1.1 JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI)
plugin.
1.2.1 JavaScript GUI Lib: Moment.js bundle plugin JavaScript GUI Lib: Moment.js bundle plugin.
1.1.1 JIRA plugin This plugin integrates Jenkins to Atlassian JIRA.
2.4.2 jQuery plugin This allows other plugins to use jQuery in UI.
1.11.2-0 JUnit Plugin Allows JUnit-format test results to be published.
1.21
JWT for Blue Ocean BlueOcean JWT plugin: Enables JWT based BlueOcean API authentication
1.2.0
Kubernetes plugin Jenkins plugin to run dynamic slaves in a Kubernetes/Docker environment
1.0
LDAP Plugin Adds LDAP authentication to Jenkins
1.16
Mailer Plugin This plugin allows you to configure email notifications for build results
1.20
Matrix Authorization Strategy Plugin Offers matrix-based security authorization strategies (global and per-project).
1.7
Matrix Project Plugin Multi-configuration (matrix) project type.
1.11
Maven Integration plugin This plug-in provides, for better and for worse, a deep integration of Jenkins and Maven: Automatic triggers
between projects depending on SNAPSHOTs, automated configuration of
various Jenkins publishers (Junit, ...).
2.17
Maven Release Plug-in Plug-in A plug-in that enables you to perform releases using the maven-release-plugin from Jenkins.
0.14.0 Mercurial plugin This plugin integrates Mercurial SCM with Hudson. It includes repository browsing support for hg
serve/hgweb, Google Code, Bitbucket, FishEye, KilnHG and RhodeCode.
Features include guaranteed clean builds, named branch support, module
lists, Mercurial tool installation, and automatic caching.
2.1 Metrics Plugin This plugin exposes the Metrics API to Jenkins plugins.
3.1.2.10
NodeJS Plugin NodeJS Plugin executes NodeJS script as a build step.
1.2.4
OWASP Markup Formatter Plugin Uses the OWASP Java HTML Sanitizer to allow safe-seeming HTML markup to be entered in project
descriptions and the like.
1.5 PAM Authentication plugin Adds Unix Pluggable Authentication Module (PAM) support to Jenkins
1.3 Personalization for Blue Ocean Blue Ocean Personalization
1.2.0
Pipeline A suite of plugins that lets you orchestrate automation, simple or complex. See Pipeline as Code with Jenkins for more details.
2.5
Pipeline Graph Analysis Plugin Provides a REST API to access pipeline and pipeline run data.
1.5
Pipeline implementation for Blue Ocean This plugin is a part of BlueOcean Plugin
1.2.0
Pipeline SCM API for Blue Ocean This plugin is a part of BlueOcean Plugin
1.2.0
Pipeline Utility Steps Utility steps for pipeline jobs.
1.4.0
Pipeline: API Plugin that defines Pipeline API.
2.20
Pipeline: Basic Steps Commonly used steps for Pipelines.
2.6
Pipeline: Build Step Adds the Pipeline step build to trigger builds of other jobs.
2.5.1
Pipeline: Declarative Agent API Replaced by Pipeline: Declarative Extension Points API plugin.
1.1.1
Pipeline: Declarative Extension Points API APIs for extension points used in Declarative Pipelines.
1.1.9
Pipeline: GitHub Groovy Libraries Allows Pipeline Grrovy libraries to be loaded on the fly from GitHub.
1.0 Pipeline: Groovy Pipeline execution engine based on continuation passing style transformation of Groovy scripts.
2.40
Pipeline: Input Step Adds the Pipeline step input to wait for human input or approval.
2.8
Pipeline: Job Defines a new job type for pipelines and provides their generic user interface.
2.11.2
Pipeline: Milestone Step Plugin that provides the milestone step
1.3.1
Pipeline: Model API Model API for Declarative Pipeline.
1.1.9
Pipeline: Model Definition An opinionated, declarative Pipeline.
1.1.9
Pipeline: Multibranch Enhances Pipeline plugin to handle branches better by automatically grouping builds from different branches.
2.16
Pipeline: Nodes and Processes Pipeline steps locking agents and workspaces, and running external processes that may survive a Jenkins
restart or slave reconnection.
2.15
Pipeline: REST API Plugin Provides a REST API to access pipeline and pipeline run data.
2.9
Pipeline: SCM Step Adds a Pipeline step to check out or update working sources from various SCMs (version control).
2.5
Pipeline: Shared Groovy Libraries Shared libraries for Pipeline scripts.
2.8
Pipeline: Stage Step Adds the Pipeline step stage to delineate portions of a build.
2.2 Pipeline: Stage Tags Metadata Library plugin for Pipeline stage tag metadata.
1.1.9
Pipeline: Stage View Plugin Pipeline Stage View Plugin.
2.9
Pipeline: Step API API for asynchronous build step primitive.
2.12
Pipeline: Supporting APIs Common utility implementations to build Pipeline Plugin
2.14
Plain Credentials Plugin Allows use of plain strings and files as credentials.
1.4 Pub-Sub "light" Bus A simple Publish-Subscribe light-weight event bus for Jenkins
1.12
Publish Over SSH Send build artifacts over SSH
1.17 Resource Disposer Plugin Dispose resources asynchronously. Utility plugin for resources that require more retries or take a long
time to delete.
0.7
REST API for Blue Ocean This plugin is a part of Blue Ocean UI
1.2.0
REST Implementation for Blue Ocean This plugin is a part of Blue Ocean UI
1.2.0
SCM API Plugin This plugin provides a new enhanced API for interacting with SCM systems.
2.2.1
Script Security Plugin Allows Jenkins administrators to control what in-process scripts can be run by less-privileged users.
1.34
Serenity plugin This plugin publishes Serenity reports which are code coverage, complexity and stability project metrics.
1.2 Server Sent Events (SSE) Gateway Plugin Server Sent Events (SSE) Gateway.
1.15 Shelve Project Plugin This plugin lets you shelve projects so that they can easily be resurrected.
1.5 SonarQube Scanner for Jenkins This plugin allows an easy integration of SonarQube, the open source platform for Continuous
Inspection of code quality.
2.6.1
SSH Credentials Plugin Allows storage of SSH credentials in Jenkins
1.13 Structs Plugin Library plugin for DSL plugins that need names for Jenkins objects.
1.10
Token Macro Plugin This plug-in adds reusable macro expansion capability for other plug-ins to use.
2.3
Variant Plugin This user-invisible library plugin allows other multi-modal plugins to behave differently depending on where they run.
1.1 Web for Blue Ocean Blue Ocean core
1.2.0
Windows Slaves Plugin Allows you to connect to Windows machines and start slave agents on them.
1.3.1
Workspace Cleanup Plugin This plugin deletes the project workspace after a build is finished.
0.34
Any ideas??? I don't even have a clue on where to search for a solution so any help would be welcome.
Thanks,
Milo
There were some crashed pipelines that did not have any status in the overview screen. After deleting the build instances from those jobs (..//build/...) the error went away. Wrong build can be seen by that there are no symlinks to the job.
You'll understand when you go to the corresponding folders :)
Cleanup script:
#!/bin/bash
export BASEFOLDER="/data/jenkins/volumes/tools/web/jobs/"
cd $BASEFOLDER
for folder in */; do
echo "Checking '$folder'..."
cd "${folder}builds" 2>/dev/null || continue
export HIGHEST=`ls | grep -o '[0-9]*' | sort -nr | head -n 1`
echo " Found $HIGHEST. Checking symlink..."
if [ $(find . -maxdepth 1 -lname $HIGHEST | wc -l) -eq 0 ] && [ "$HIGHEST" != "" ]; then
echo " *******************************************"
echo " Missing. Running the command below to fix this:"
echo " rm -rf \"`pwd`/$HIGHEST\""
echo " *******************************************"
rm -rf \"`pwd`/$HIGHEST\"
fi
cd $BASEFOLDER
done
I want to integrate JIRA with Jenkins so as to update tickets automatically when a job is build successfully or failed.
I have established JIRA and Jenkins server separately both working properly.I have the following JIRA plugins in Jenkins installed:-
1) Jira Issue Updater
This plugin can update Jira issues by changing their workflow status and adding comments.
1.11
2) JIRA plugin
This plugin integrates Jenkins to Atlassian JIRA.
1.39
3) JIRA Plugin for Jenkins
This plugin implements the Application Link API to support integration with Atlassian JIRA
1.5.3
4) JiraTestResultReporter plugin
This plugin creates issues in Jira for failed unit tests.
Following add-on in JIRA server:-
1) JIRA Plugin to integrate Jenkins CI
Version: 1.5.3
Vendor: Marvelution
Add-on key: com.marvelution.jira.plugins.jenkins
2) JIRA Plugin to integrate Hudson CI
Version: 5.0.4
Vendor: Marvelution
Add-on key: com.marvelution.jira.plugins.hudson
I want to build a job in Jenkins and wants the issue to be generated automatically in JIRA if the build Passes/Fails.
Please let me know if you need more information.
Try with this plugin..it may helps you to get what you need..
I could't able to add Outgoing Authentication of following credentials Service Provider Name, Consumer Key, Shared Secret,Request Token URL, Authorize URL..etc, while the creating application links for Jenkins. Also I couldn't able to see Application links/Creating reciprocal links in Jenkins.
Jenkins ver. 1.580
JIRA version 6.4
JIRA plugin for jenkins 1.39
JiraTestResultReporter plugin for jenkins 1.0.4
I was able to integrate Jenkins and Jira successfully via the SOAP service of Jira
I did not create an application link for Jenkins. Application links in Jira are applicable only for Atlassian Suite of products and not external products like Jenkins.
Jenkins talks to Jira via SOAP service something looks like the URL below
yourjirahost:yourjiraport/rpc/soap/jirasoapservice-v2
Any username password that can connect to a particular issue
I have installed Jenkins Plugin for JIRA on my JIRA installation and also JIRA Plugin for Jenkins on to my Jenkins installation. I have added an application link in JIRA settings.
I am facing below issue:
1) On Application Links page there is a warning that my Jenkins Application "seems to be offline". While Adding a jenkins link it gives me error : The host doesn't respond. Change the url or click next to confirm.
Jira Version - 6.0.5
Jenkins Version - 1.562
Jenkins-Jira Plugin Version - 1.4.3
Thanks to anybody who's willing to help me out on this.
You can follow four steps:
Install JIRA Plugin in Jenkins
In Jenkins:
Manage Jenkins > manager plugins > available
search and choose Jenkins JIRA plugin , Jenkins JiraTestResultReporter plugin and Jenkins JIRA Issue Updater
Install Jenkins Plugin in JIRA.
https://marketplace.atlassian.com/plugins/com.marvelution.jira.plugins.jenkins
see: Installation section.
Add Jenkins 's Application Links in JIRA
The integration between JIRA and Jenkins has Application Links as its base. This allows administrators to configure and manage the Jenkins
To get started, go to [JIRA_BASEURL]/plugins/servlet/applinks/listApplicationLinks and click on the Add Application Link button to add a new Application Link for Jenkins.
or administration > plugin > Application Link > add Application Link; do as instruction
note: Optionally, but required if Jenkins is secured,
configure Outgoing Authentication that JIRA should use.
To do this, click on the Edit link next to the Jenkins Application Link, and select OutGoing Authentication tab
Provide the Username of the user to use to authenticate against Jenkins with
Provide the Password of the use
Jenkins Configuration
After the installation of the Jenkins Plugin for JIRA, and the configuration of at-least one Application Link, administrators will be able to control which Jobs are included in the synchronisation process and which aren't.
in Administration > plugins (add-ons) >Jenkins Configuration
Download JIRA plugin for Jenkins and install this plugin in Jenkins
way 1: copy it to Jenkins's plugin folder. and restart Jenkins
way2: Manage Jenkins > manager plugins > advanced > Upload Plugin . Choose file and upload then restart Jenkins
Enable Jenkins job in JIRA
then just use a known JIRA Issue Key in a commit message of your source code repo
Jenkins will make all the change sets (commits) available to the JIRA plugin when syncing a build.
The sync process uses the change sets to look for JIRA Issue Keys. Once this process locates a link, then that build will be available in the CI Build Panels.
download jenkins-jira-plugin at http://mvnrepository.com/artifact/com.marvelution.jira.plugins/jenkins-jira-plugin