You can create and update JIRA tasks and issues in a release pipeline.

About this task

When you register a JIRA server endpoint, you connect vRealize Code Stream to a JIRA server so that the pipeline can use the JIRA server to create and update JIRA tasks and issues.

Prerequisites

  • Verify that the JIRA server endpoint is registered. See the Installation and Configuration guide.

  • Verify that the JIRA server version is 6.3 or later.

Procedure

  1. Click the Code Stream tab.
  2. On the Pipelines tab, select an existing pipeline and click Edit to configure it.
  3. Click the Stages > button.
  4. Click Add Task.
  5. Select JIRA from the Provider drop-down menu.
  6. Enter a name for the task and click OK.
  7. Select the new task in the stage.
  8. Confirm to save the pipeline.
  9. Click the task you created.
  10. Select an Execute Task for the release pipeline.

    Option

    Description

    Always

    Runs the release pipeline task without conditions.

    On Condition(s)

    Runs the release pipeline task only if the defined condition is evaluated as true. If the condition is false, the task is skipped.

    A boolean expression using the following operands and operators is supported.

    • Pipeline variables such as, ${pipeline.variableName}. Curly brackets are reserved for specifying pipeline variables.

    • Task output variables such as, ${Stage1.task1.machines[0].value.hostIp[0]}

    • Default pipeline binding variables such as, ${releasePipelineName}

    • Case insensitive Boolean values such as, true, false, 'true', 'false'

    • Integer or decimal values without quotes

    • String values used with single or double quotes such as, "test", 'test'

    • String and Numeric types of values such as, == Equals and != Not Equals

    • Relational operators such as, > , >=, <, and <=

    • Boolean logic such as, && and ||

    • Arithmetic operators such as, +, -, *, and /

    • Nested expressions using round brackets

    • Strings with literal value ABCD is evaluated as false and the task is skipped.

    Unary operators are not supported.

    A sample condition, ${Stage1.task1.output} == “Passed” || ${pipeline.variableName} == 39

  11. (Optional) : Select the Continue Pipeline execution even if this task fails option.

    This option allows the release pipeline to bypass the failed task and continue with the execution process.

  12. Select the JIRA endpoint from the Endpoint drop-down menu.
  13. Select the action you want to perform.

    Option

    Description

    Create Issue

    To create a JIRA issue, run a release pipeline model that contains a JIRA task.

    Update Issue

    Edit the issue by providing the Issue ID.

  14. Select the project and issue type.

    Based on the project and issue type that you select, the input properties in the required and optional tabs vary.

  15. Enter the description, summary, and the reporter name.
  16. Click Save.
  17. Click Execute to run the release pipeline.
  18. Click the executed pipeline.

    Task Result displays the Issue number, Assignee, Issue status, Project, and URL. The URL redirects you to the issue in detail.

  19. Enter the JIRA issue number to update the existing issue.

    You can also select assignee, transition, resolution (if configured), and enter your comments.

  20. Click Save.

Output Format for a JIRA Task

The following task output format is an example for a test task.

[
  {
    "name": "issueNumber",
    "type": "String",
    "description": "Issue Number",
    "value": "VSD-1"
  },
  {
    "name": "assignee",
    "type": "String",
    "description": "Assignee",
    "value": "jiraadmin"
  },
  {
    "name": "issueStatus",
    "type": "String",
    "description": "Issue Status",
    "value": "Resolved"
  },
  {
    "name": "project",
    "type": "String",
    "description": "Project",
    "value": "Project-1"
  }
]