semantic-release-jira
semantic-release plugin to publish a jira release.
Step | Description |
---|
verifyConditions | Validate the config options and check for a credentials in the environment |
sucess | Find all tickets from commits and add them to a new release on JIRA |
Install
$ npm install --save-dev @temptek/semantic-release-jira
$ yarn add --dev @temptek/semantic-release-jira
Environment variables
Variable | Description |
---|
JIRA_AUTH | Base64 encoded string of username:password . |
JIRA_USERNAME | Username in Jira. Used for basic auth. |
JIRA_PASSWORD | Password in Jira. Used for basic auth. |
JIRA_EMAIL | Email address in Jira. Used for basic auth. |
JIRA_API_TOKEN | Api token in Jira. Used for basic auth. How to create an api token? |
Use either JIRA_AUTH
, JIRA_USERNAME
and JIRA_PASSWORD
or JIRA_EMAIL
and JIRA_API_TOKEN
.
Configuration
The plugin should be added to your config
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/git",
[
"@temptek/semantic-release-jira",
{
"projectId": "UH",
"releaseNameTemplate": "Test v${version}",
"jiraHost": "uphabit.atlassian.net",
"ticketPrefixes": [
"TEST",
"UH"
],
"ticketRegex": "[a-zA-Z]{3,5}-\\d{3,5}"
}
]
]
}
Please note that ticketRegex
cannot be used together with ticketPrefixes
.
interface Config {
jiraHost: string;
ticketPrefixes?: string[];
ticketRegex?: string;
projectId: string;
releaseNameTemplate?: string;
releaseDescriptionTemplate?: string;
networkConcurrency?: number;
released?: boolean;
setReleaseDate?: boolean;
useBoardForActiveSprint?: string;
}