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

Jira issue extractor from any source jira-issue-extractor

Extract jira issue from message and convert it to image annotation

arguments

  • FAIL_ON_NOT_FOUND - Fail in case of ticket not found
  • IMAGE - Your image to which you want assign issues
  • JIRA_API_TOKEN - Token that you generate in jira
  • JIRA_CONTEXT - Jira integration name, (Account settings -> Atlassian Jira)
  • JIRA_EMAIL - Your jira email
  • JIRA_HOST - Jira host, should be without protocol and / in the end
  • JIRA_PROJECT_PREFIX - Jira project prefix. Specify one or more prefixes as a comma-separated list or as a regex. (/[A-Z]{2,}-\d+/g,SAAS,CF, etc)
  • MESSAGE - Message from which you want retrieve issue name, can be branch, commit message, whatever
    build:
  title: Building Docker image
  type: build
  image_name: 'codefresh/${{CF_REPO_NAME}}'
  tag: '${{PACKAGE_VERSION}}'
  dockerfile: Dockerfile
jira-issue-extractor:
  title: Enrich image with annotations
  type: jira-issue-extractor
  arguments:
    IMAGE: 'gcr.io/codefresh-inc/codefresh/${{CF_REPO_NAME}}:${{IMAGE_TAG}}'
    JIRA_PROJECT_PREFIX: '${{CF_BRANCH}}'
    MESSAGE: SAAS-21011-ability-to-remove-user
    JIRA_HOST: codefresh-io.atlassian.net
    JIRA_EMAIL: pavel@codefresh.io
    JIRA_API_TOKEN: '******'

  
github.com
Pavel Kostohrys
May 25, 2023