Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
610

Jira Issue Comment jira-issue-comment

Add or update a Jira issue comment

arguments

  • ADD_BRANCH_INFO - Add the branch information to the Jira comment
  • ADD_COMMIT_INFO - Add the commit information to the Jira comment
  • ADD_PR_INFO - Add the pull request information to the Jira comment
  • BUILD_MESSAGE - Custom build message at the top of the Jira comment
  • BUILD_STATUS - Current status of the build
  • JIRA_API_KEY - Jira API key
  • JIRA_BASE_URL - Jira base url
  • JIRA_COMMENT_ID - Jira comment ID to update a comment
  • JIRA_ISSUE_SOURCE_FIELD - Jira issue ID or key source field
  • JIRA_ISSUE_SOURCE_FIELD_REGEX - Regex expression to get the Jira issue info from the JIRA_ISSUE_SOURCE_FIELD
  • JIRA_USERNAME - Jira username
  • VERBOSE - Enable verbose logging by setting to true
    JiraTicketUpdate:
  title: Add Jira Comment
  type: jira-issue-comment
  arguments:
    JIRA_BASE_URL: 'https://company-name.atlassian.net'
    JIRA_USERNAME: jira-dev-ops-user
    JIRA_API_KEY: '${{JIRA_API_KEY}}'
    JIRA_ISSUE_SOURCE_FIELD: SA-19
    BUILD_MESSAGE: '${{BUILD_MESSAGE}}'
    BUILD_STATUS: Build Started

  
    JiraTicketUpdate:
  title: Update Jira Comment
  type: jira-issue-comment
  arguments:
    JIRA_BASE_URL: 'https://company-name.atlassian.net'
    JIRA_USERNAME: jira-dev-ops-user
    JIRA_API_KEY: '${{JIRA_API_KEY}}'
    JIRA_ISSUE_SOURCE_FIELD: SA-19
    JIRA_COMMENT_ID: '${{JIRA_COMMENT_ID}}'
    BUILD_MESSAGE: '${{BUILD_MESSAGE}}'
    BUILD_STATUS: Build Completed

  
    JiraTicketUpdate:
  title: Add Jira Comment With Info
  type: jira-issue-comment
  arguments:
    JIRA_BASE_URL: 'https://company-name.atlassian.net'
    JIRA_USERNAME: jira-dev-ops-user
    JIRA_API_KEY: '${{JIRA_API_KEY}}'
    JIRA_ISSUE_SOURCE_FIELD: SA-19
    BUILD_MESSAGE: '${{BUILD_MESSAGE}}'
    BUILD_STATUS: Build Completed
    ADD_BRANCH_INFO: true
    ADD_COMMIT_INFO: true
    ADD_PR_INFO: true

  
github.com
Brandon Phillips
Jul 4, 2021