Jira Integration
This documentation guide provides step-by-step instructions for enabling the Jira integration option in the Portal UI for KubeRocketCI. Jira integration allows including useful metadata in Jira tickets.
Overviewβ
Integrating Jira can provide a number of benefits, such as increased visibility and traceability, automatic linking code changes to relevant Jira issues, streamlining the management and tracking of development progress.
By linking CI pipelines to Jira issues, teams can get a better understanding of the status of their work and how it relates to the overall development process. This can help to improve communication and collaboration, and ultimately lead to faster and more efficient delivery of software.
Enabling Jira integration allows for the automatic population of three fields in Jira tickets: Fix Versions, Components, and Labels. Each of these fields provides distinct benefits:
- Fix Versions: helps track progress against release schedules;
- Components: allows grouping related issues together;
- Labels: enables identification of specific types of work.
Teams can utilize these fields to enhance their work prioritization, identify dependencies, improve collaboration, and ultimately achieve faster software delivery.
Integration Procedureβ
In order to adjust the Jira server integration, add the JiraServer CR by performing the following:
-
Provision the ci-jira secret using
EDP Portal
,Manifest
or with theexternalSecrets
operator:- KubeRocketCI
- Manifests
- External Secrets Operator
Go to KubeRocketCI -> Configuration -> Management Tool.
Fill in the URL, User, Password fields and click the Save button:
-
Create Kubernetes Secret:
apiVersion: v1
kind: Secret
metadata:
name: ci-jira
namespace: edp
labels:
app.edp.epam.com/secret-type=jira
stringData:
username: username
password: password -
Create
JiraServer
CR with the apiUrl, credentialName and rootUrl fields:apiVersion: v2.edp.epam.com/v1
kind: JiraServer
metadata:
name: jira-server
namespace: edp
spec:
apiUrl: 'https://jira-api.example.com'
credentialName: ci-jira
rootUrl: 'https://jira.example.com'noteThe value of the credentialName property is the name of the Kubernetes Secret, created on the previous step.
-
Configure secret in Parameter Store:
"ci-jira":
{
"username": "username",
"password": "password"
} -
Create
JiraServer
CR with the apiUrl, credentialName and rootUrl fields:apiVersion: v2.edp.epam.com/v1
kind: JiraServer
metadata:
name: jira-server
namespace: edp
spec:
apiUrl: 'https://jira-api.example.com'
credentialName: ci-jira
rootUrl: 'https://jira.example.com'noteThe value of the credentialName property is the name of the Kubernetes Secret, created on the previous step.
Required Permissions for Issue ManagementTo manage issue labels, components, and add links in Jira, please make sure the user has the following permissions:
- Edit Issues: This permission is necessary to modify issue fields, including adding or removing labels and components.
- Link Issues: You must have this permission to create and manage links between issues.
- Add Comments: Required for adding external links and comments to issues.
Enable Jira During Platform Deploymentβ
KubeRocketCI offers the capability to incorporate Jira integration as part of its deployment process. To follow this approach, please review the following parameters of the values.yaml file. Enabling the jira.integration
parameter creates the following custom resources:
- QuickLink;
- JiraServer;
- External Secrets Operator (in case it is used).
To set up Jira integration along with the platform, follow the steps below:
-
Create the ci-jira secret in the platform namespace (e.g.,
edp
) as it's described above. -
Deploy the platform with the
jira.integration
parameter set totrue
in the values.yaml file.
Jira Usageβ
To use Jira, you need to set up your codebases properly.
During the codebase creation process, proceed to the Advanced Settings tab. Here, ensure to mark the Integrate with Jira server checkbox and complete the necessary fields accordingly:
There are four predefined variables, each with specific values, that can be utilized individually or in combination. These variables display varying data based on the versioning type in use (edp
or default
):
When using the edp versioning
scheme:
- EDP_COMPONENT β yields the name of the application;
- EDP_VERSION β produces either 0.0.0-SNAPSHOT or 0.0.0-RC as output;
- EDP_SEM_VERSION β generates a semantic version, specifically 0.0.0;
- EDP_GITTAG β returns a Git tag format such as build/0.0.0-SNAPSHOT.2 or build/0.0.0-RC.2
If the default versioning
type is used:
- EDP_COMPONENT β returns application-name;
- EDP_VERSION β returns the date when the application was tagged. (Example: 20231023-131217);
- EDP_SEM_VERSION β returns the date when the application was tagged. (Example: 20231023-131217);
- EDP_GITTAG β returns the date when the application was tagged. (Example: 20231023-131217).
There are no character restrictions when combining the variables. You can concatenate them using the dash sign.
Combination samples:
EDP_SEM_VERSION-EDP_COMPONENT;
EDP_COMPONENT-hello-world/EDP_VERSION;
etc.
Upon successful configuration of the Jira integration, your tickets will be enriched with additional metadata:
Should you encounter an issue where metadata is not appearing within a Jira ticket, it's advisable to inspect the status field of the JiraIssueMetadata
custom resources located in the platform namespace (e.g, edp
). The codebase-operator typically removes this resource after post-processing, it may persist in case of reconciliation issues, remaining within the namespace.