Skip to content

Latest commit

 

History

History
137 lines (113 loc) · 4.97 KB

File metadata and controls

137 lines (113 loc) · 4.97 KB
humanName heading lead attribution intro seo logoImage coverImage coverImageAlt availableOnRoadie roadieDocsPath thingsToKnowTitle thingsToKnowHostDependant thingsToKnowOnRoadie gettingStarted
Jira
Backstage Jira Plugin
See Jira summary in Backstage
text href
Roadie
<p> <a href="https://www.atlassian.com/software/jira" arget="_blank">Jira</a> is an issue tracking product developed by Atlassian that allows bug tracking and agile project management. Jira offers numerous features like sprints for Scrum management and other agile boards like Kanban. This allows teams to organize projects, define, assign and prioritize tasks. Furthermore, Jira is ideal for progress tracking, bug tracking and complete transparency throughout the entire project lifecycle. </p> <p> The Jira Backstage plugin lets you bring the Jira project related to your service into the Catalog. You can keep track of tasks, stories, bugs, and epics from the service page in Backstage. In this guide you'll find: </p> <ul> <li><a href="#installation-steps">Installation steps</a></li> <li><a href="#section-add-annotations">Required annotations</a></li> <li><a href="#things-to-know">Obtaining a Jira token</a></li> </ul>
title description
Backstage Jira Plugin | Roadie
The Backstage Jira plugin integrates with Jira to show Jira information inside Backstage where it can be associated with your project.
../../assets/logos/jira/jira_logo.png
../../assets/jira-plugin.png
A preview of Jira plugin including tasks summary, project information and Activity Stream.
true
/jira/
Using a Jira token
true
/docs/integrations/jira/#step-1-create-an-api-token
intro language code
Install the plugin into Backstage.
bash
yarn --cwd packages/app add @roadiehq/backstage-plugin-jira
intro language code
Add proxy config
yaml
# app-config.yaml proxy: '/jira/api': target: '<JIRA_URL>' headers: Authorization: $env: JIRA_TOKEN Accept: 'application/json' Content-Type: 'application/json' X-Atlassian-Token: 'nocheck' User-Agent: "MY-UA-STRING"
intro language code
Set img-src in Content Security Policy
yaml
// app-config.yaml backend: # ... csp: img-src: # "'self'" and 'data' are from the backstage default but must be set since img-src is overriden - "'self'" - 'data:' # Allow your Jira instance for @roadiehq/backstage-plugin-jira - 'JIRA_URL'
intro language code
Add plugin API to your Backstage instance
typescript
// packages/app/src/components/catalog/EntityPage.tsx import { EntityJiraOverviewCard, isJiraAvailable } from '@roadiehq/backstage-plugin-jira'; const overviewContent = ( <Grid container spacing={3} alignItems="stretch"> <EntitySwitch> <EntitySwitch.Case if={isJiraAvailable}> <Grid item md={6}> <EntityJiraOverviewCard /> </Grid> </EntitySwitch.Case> </EntitySwitch> </Grid> );
intro language sectionId code
Add annotation to the yaml config file of a component
yaml
add-annotations
metadata: annotations: jira/project-key: <example-jira-project-key> jira/component: <example-component> # optional, you might skip this value to fetch data for all components jira/token-type: Bearer # optional, used for Activity stream feed. If you are using Basic auth you can skip this.
intro
Even though you can use Bearer token please keep in mind that Activity stream feed will only contain entries that are visible to anonymous users. In order to view restricted content you will need to authenticate via Basic authentication, as described in official documentation (https://developer.atlassian.com/server/framework/atlassian-sdk/consuming-an-activity-streams-feed/#authentication).
intro
Provide the JIRA_TOKEN environmental variable (instructions at the notes below)
  1. Obtain you personal token from Jira.

  2. Create a base64-encoded string by converting a string in format

    <your-atlassian-account-mail>:<your-jira-token>
    

    for example:

    jira-mail@example.com:hTBgqVcrcxRYpT5TCzTA9C0F
    

    converts to base64

    amlyYS1tYWlsQGV4YW1wbGUuY29tOmhUQmdxVmNyY3hSWXBUNVRDelRBOUMwRg==
    
  3. Save it as the environmental variable JIRA_TOKEN with Basic prefix, for example:

    JIRA_TOKEN='Basic amlyYS1tYWlsQGV4YW1wbGUuY29tOmhUQmdxVmNyY3hSWXBUNVRDelRBOUMwRg=='
    

    Alternatively, if you are running backstage locally, you can provide the variable by the command

    env JIRA_TOKEN='Basic amlyYS1tYWlsQGV4YW1wbGUuY29tOmhUQmdxVmNyY3hSWXBUNVRDelRBOUMwRg==' yarn dev