![]() The script performs a request to add a comment to the Jira issue specified using the jira.json as the payload.These environment variables are used to replace values in the jira.json comment template using sed, a stream editor for parsing and transforming text. Setting additional environment variablesĪdditional environment variables are then set, such as the build number, build date, and commit number. See this link about the JSON data that $CM_ARTIFACT_LINKS contains. Using jq to parse $CM_ARTIFACT_LINKSįirst, it uses jq (a command-line tool for parsing JSON) to parse the contents of the Codemagic environment variable $CM_ARTIFACT_LINKS to find information such as the articact URL, filename, bundle id, and version name and store the values in environment variables. The script section for publishing to Jira contains several actions which set environment variables, update the comment template, and then use cURL requests to add a comment and upload files to a specific Jira issue. Note that it contains strings beginning with $, which the scripts use to replace values in the JSON using sed before it is added as JSON payload to the cURL requests. Click here for more information about ADF and how to modify this template. ![]() The Atlassian Document Format (ADF) is used to format the comment layout and style. This folder contains a template file called jira.json, which adds formatted comments to a Jira issue. templates folder to the root of your project. Adding formatted comments to a Jira issueĬopy the. Once you know the transition id then put this value in the JIRA_TRANSITION_ID environment variable. You can obtain the available transition ids using a cURL request as documented in the Jira API documentation. If you want to transition your issue to another status, you will need to know what transition ids are available. Finding and updating the JIRA_TRANSITION_ID environment variable ![]() Put this value in the JIRA_ISSUE environment variable. Issues, epics, and stories have a unique id, usually in the format ‘projectKey-id’, and is visible on your issues either in the bottom right or top left when looking at an issue. Specifying the JIRA_ISSUE environment variable Put the subdomain including “” in the JIRA_BASE_URL environment variable. This is the subdomain you chose when you set up your Jira account e.g. Adding the JIRA_BASE_URL environment variable This value is used in the Authorization header used in cURL requests to the Jira API. ![]() The JIRA_AUTH environment variable is a base64 encoded string which consists of the email address you log into Jira with and the Jira API token you can encode these credentials in the macOS Terminal using:Īlternatively, use an online tool to base64 encode this string. There are four environment variables that need to be updated for the Jira integration: JIRA_AUTH, JIRA_BASE_URL, JIRA_ISSUE and JIRA_TRANSITION_ID Updating the JIRA_AUTH environment variable Then, update the environment variables as indicated and use the documentation links, where required, for the values related to building your app, code signing, and app publishing. You will need access to a Jira account and can sign up for free.Ĭreate a Jira API Token once you have access to Jira.Ĭopy the codemagic.yaml from the starter project into the root of your repository. Getting startedĬlone the Jira integration starter project from the Codemagic GitHub page. The following example shows how to set up integration with Jira using the codemagic.yaml configuration with a native iOS project but the approach is the same for Flutter, React Native, and native Android projects. It offers a REST API that can be used in conjunction with your Codemagic workflows to add comments, upload attachments, or transition the status of an issue, story, or epic. Many software development teams use it to maintain the visibility of their projects. Jira is an issue tracking and project management product developed by Atlassian. How to integrate your workflows with Jira using codemagic.yaml ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |