> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# applicaa/jira-notifier

This Orb reports the status of builds and deployments in CircleCI Projects to your Jira Cloud instance.
Requires that [CircleCI for Jira](https://marketplace.atlassian.com/apps/1215946) be installed in the Jira *Cloud* instance.
Please see [CircleCI Jira integration docs](https://circleci.com/docs/2.0/jira-plugin/)


## Commands

### greet

This command echos "Hello World" using file inclusion.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `to` | string | World | Hello to whom? |

### notify

| Parameter | Type | Default | Description |
|---|---|---|---|
| `environment` | string | ${CIRCLE_JOB} | For deployments. Indicates the name of target environment. Default is the CircleCI Job Name. |
| `environment_type` | enum | development | Indicates the category of target environment as defined by Atlassian |
| `issue_regexp` | string | [A-Z]{2,30}-[0-9]+ | Override the default project key regexp if your project keys follow a different format. |
| `jira_issue_keys` | string |  | Manually set Jira issue keys |
| `job_type` | enum | build | Indicates if job should be treated as build or deployment in Jira dev panel. Note that Deployments require additional details |
| `scan_commit_body` | boolean | false | Whether or not to scan the Commit Body for the JIRA Issue Tag. Default is false. |
| `service_id` | string |  | Specify the JSD service ID for the project this notification targets. |
| `state_path` | string | ./circleci-orb-jira.status | Relative or absolute path to a store build state for orb. |
| `token_name` | string | CIRCLE_TOKEN | The name of environment variable containing CircleCI API Token. Required for all projects. |

## Jobs

### hello

Sample description


| Parameter | Type | Default | Description |
|---|---|---|---|
| `to` | string | World | Hello to whom? |

## Executors

### default

This is a sample executor using Docker and Node.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | lts | Pick a specific circleci/node image variant: https://hub.docker.com/r/cimg/node/tags
 |

## Examples

### basic_build

Notify jira on single job

```yaml
version: '2.1'
orbs:
  jira: circleci/jira@x.y.z
jobs:
  build:
    docker:
      - image: circleci/node:10
    steps:
      - run: echo "hello"
workflows:
  build:
    jobs:
      - build:
          post-steps:
            - jira/notify
```

### example

Sample example description.


```yaml
version: '2.1'
orbs:
  <orb-name>: <namespace>/<orb-name>@1.2.3
workflows:
  use-my-orb:
    jobs:
      - <orb-name>/<job-name>
```

### full_workflow

Includes multiple build jobs and deployment jobs.

```yaml
version: '2.1'
orbs:
  jira: circleci/jira@x.y.z
jobs:
  component-A:
    docker:
      - image: circleci/node:10
    steps:
      - checkout
      - run: exit 0
      - jira/notify
    working_directory: ~/repo
  component-B:
    docker:
      - image: circleci/node:10
    steps:
      - checkout
      - run: sleep 2
      - jira/notify
    working_directory: ~/repo
  deploy:
    docker:
      - image: circleci/node:10
    steps:
      - checkout
      - run: echo "hi Jira"
    working_directory: ~/repo
  integration:
    docker:
      - image: circleci/node:10
    steps:
      - checkout
      - run: echo "hi Jira"
      - jira/notify
    working_directory: ~/repo
workflows:
  build-deploy:
    jobs:
      - component-A
      - component-B
      - integration:
          requires:
            - component-A
            - component-B
      - deploy:
          name: Dev East
          post-steps:
            - jira/notify:
                environment_type: development
                job_type: deployment
          requires:
            - integration
      - deploy:
          name: Test East
          post-steps:
            - jira/notify:
                environment_type: testing
                job_type: deployment
          requires:
            - Dev East
      - hold:
          name: Verify
          requires:
            - Test East
          type: approval
      - deploy:
          name: Prod East
          post-steps:
            - jira/notify:
                environment_type: production
                job_type: deployment
          requires:
            - Verify
```