|
1 | | -<p align="center"> |
2 | | - |
3 | | - [](https://github.com/rohit-gohri/jira-ci-cd-integration/releases) |
4 | | - |
5 | | - <a href="https://github.com/rohit-gohri/jira-ci-cd-integration/actions"><img alt="action status" src="https://github.com/rohit-gohri/jira-ci-cd-integration/workflows/build-test/badge.svg"></a> |
| 1 | +[](https://github.com/rohit-gohri/jira-ci-cd-integration/releases) |
| 2 | +[](https://hub.docker.com/repository/docker/boringdownload/jira-integration) |
| 3 | +<a href="https://github.com/rohit-gohri/jira-ci-cd-integration/actions"><img alt="action status" src="https://github.com/rohit-gohri/jira-ci-cd-integration/workflows/build-test/badge.svg"></a> |
| 4 | +<a href="https://github.com/rohit-gohri/jira-ci-cd-integration/actions"><img alt="action status" src="https://github.com/rohit-gohri/jira-ci-cd-integration/workflows/release/badge.svg"></a> |
6 | 5 |
|
7 | | -</p> |
| 6 | +# Jira Development Integration |
8 | 7 |
|
9 | | -# Jira CI/CD Integration |
| 8 | +Integrate your CI/CD pipeline's Build and Deployment information into the Jira Development Panel. |
10 | 9 |
|
11 | | -Integrate your CI/CD pipeline information into the Jira Builds/Deployments Panel. |
| 10 | + |
12 | 11 |
|
13 | 12 | > Only supports Jira Cloud. Does not support Jira Server (hosted) |
14 | 13 |
|
15 | | - |
16 | | - |
17 | 14 | ## Prerequisites |
18 | 15 |
|
19 | 16 | ### Generate Credentials |
@@ -66,32 +63,93 @@ Generate new OAuth Credentials and copy |
66 | 63 | client_secret: ${{ secrets.JIRA_CLIENT_SECRET }} |
67 | 64 | ``` |
68 | 65 |
|
69 | | -#### Options |
| 66 | +## Use with Other CI/CD Providers |
| 67 | +
|
| 68 | +Supported in providers which support running arbitrary Docker images (like Drone, Gitlab CI). |
| 69 | +
|
| 70 | +Docker Images are available from: |
| 71 | +
|
| 72 | +- Docker Hub: `boringdownload/jira-integration` |
| 73 | +- Github Container Registry: `ghcr.io/rohit-gohri/jira-ci-cd-integration` |
| 74 | +- Gitlab Container Registry: `registry.gitlab.com/rohit-gohri/jira-ci-cd-integration` |
| 75 | + |
| 76 | +Pick whatever you want and is convenient for you. |
| 77 | + |
| 78 | +### Set Env Vars |
| 79 | + |
| 80 | +Configuration for the Docker image is through env vars. Read more in [options](#options). |
| 81 | + |
| 82 | +#### Drone.io |
| 83 | + |
| 84 | +Add secrets for `JIRA_CLIENT_ID` and `JIRA_CLIENT_SECRET` and then add this to your pipeline: |
| 85 | + |
| 86 | +```yaml |
| 87 | +steps: |
| 88 | + - name: jira-integration |
| 89 | + image: boringdownload/jira-integration:v0 |
| 90 | + environment: |
| 91 | + BUILD_NAME: drone-pipeline |
| 92 | + JIRA_INSTANCE: companyname |
| 93 | + JIRA_CLIENT_ID: |
| 94 | + from_secret: jira_client_id |
| 95 | + JIRA_CLIENT_SECRET: |
| 96 | + from_secret: jira_client_secret |
| 97 | +``` |
| 98 | + |
| 99 | +#### Gitlab CI/CD |
| 100 | + |
| 101 | +[Add a CI/CD Variable to your project](https://docs.gitlab.com/ee/ci/variables/#add-a-cicd-variable-to-a-project) for `JIRA_CLIENT_ID` and `JIRA_CLIENT_SECRET` and then add this step to your pipeline, preferably in the last stage. |
| 102 | + |
| 103 | +```yaml |
| 104 | +jira-integration: |
| 105 | + image: registry.gitlab.com/rohit-gohri/jira-ci-cd-integration:v0 |
| 106 | + variables: |
| 107 | + BUILD_NAME: gitlab-pipeline |
| 108 | + JIRA_INSTANCE: companyname |
| 109 | +``` |
| 110 | + |
| 111 | +## Options |
| 112 | + |
| 113 | +Provide these options directly in case of Github Actions or via the env variable in the brackets for Docker. |
70 | 114 |
|
71 | | -##### jira_instance |
| 115 | +### Inputs |
72 | 116 |
|
73 | | -Sub Domain of Jira Cloud Instance |
| 117 | +#### jira_instance (JIRA_INSTANCE) |
74 | 118 |
|
75 | | -##### client_id |
| 119 | +Sub Domain of Jira Cloud Instance. This part of the url: `https://<jira_instance>.atlassian.net` |
| 120 | + |
| 121 | +#### client_id (JIRA_CLIENT_ID) |
76 | 122 |
|
77 | 123 | ClientID of OAuth Creds |
78 | 124 |
|
79 | | -##### client_secret |
| 125 | +#### client_secret (JIRA_CLIENT_SECRET) |
80 | 126 |
|
81 | 127 | Client Secret of OAuth Creds |
82 | 128 |
|
83 | | -##### event_type (optional) |
| 129 | +#### event_type (JIRA_EVENT_TYPE) (optional) |
84 | 130 |
|
85 | 131 | "build" or "deployment", (default is "build") |
86 | 132 |
|
87 | | -##### state (optional) |
| 133 | +#### state (BUILD_STATE) (optional) |
88 | 134 |
|
89 | | -"successful"/"success", "failed", or "canceled" (default is "successful") |
| 135 | +"successful"/"success", "failed", or "canceled" (default is "unknown") |
90 | 136 |
|
91 | | -##### issue (optional) |
| 137 | +#### issue (JIRA_ISSUES) (optional) |
92 | 138 |
|
93 | 139 | Will be parsed from branch name automatically if absent. Or you can provide it according to your own logic. Can be multiple issues. |
94 | 140 |
|
95 | | -##### token (optional) |
| 141 | +#### token (optional) |
| 142 | + |
| 143 | +> Only for Github Action |
96 | 144 |
|
97 | 145 | Github Token to get commit message in Pull Request Events. Since github context doesn't have commit message, we use the Github API to get it from sha. |
| 146 | + |
| 147 | +### Pipeline Info |
| 148 | + |
| 149 | +#### Commit Message (COMMIT_MESSAGE) |
| 150 | + |
| 151 | +If you have the jira id in the commit message then provide this. |
| 152 | + |
| 153 | +#### Pipeline Name (BUILD_NAME) |
| 154 | + |
| 155 | +A name for your pipeline |
0 commit comments