Skip to content

Commit fc3c04b

Browse files
committed
Alpha version, generated from commit a8237cc
1 parent 31036c3 commit fc3c04b

File tree

1 file changed

+64
-69
lines changed

1 file changed

+64
-69
lines changed

README.md

Lines changed: 64 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,7 @@ Generate new OAuth Credentials and copy
2121

2222
![OAuth Creds Screen](./docs/oauth-creds.png)
2323

24-
## Usage With Github Actions
25-
26-
[![test-release workflow](https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml/badge.svg)](https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml)
27-
28-
### Add OAuth Creds as secrets to Github
29-
30-
**See:** <https://docs.github.com/en/actions/reference/encrypted-secrets>
31-
32-
- Add Client ID as `JIRA_CLIENT_ID`
33-
- Add Client Secret as `JIRA_CLIENT_SECRET`
34-
35-
![Github Secrets](./docs/github-secrets.png)
36-
37-
### Update Github Workflow
38-
39-
#### Use in Builds Pipeline
40-
41-
```yaml
42-
- name: Jira Integration
43-
if: ${{ always() }}
44-
uses: rohit-gohri/jira-ci-cd-integration@v0
45-
with:
46-
state: ${{ job.status }}
47-
jira_instance: companyname # Subdomain for Jira Cloud
48-
client_id: ${{ secrets.JIRA_CLIENT_ID }}
49-
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
50-
```
51-
52-
#### Use in Deployment Pipeline
53-
54-
Just provide an evironment to send a deployment event instead of a build event.
55-
56-
```yaml
57-
- name: Jira Integration
58-
if: ${{ always() }}
59-
uses: rohit-gohri/jira-ci-cd-integration@v0
60-
with:
61-
state: ${{ job.status }}
62-
environment: staging
63-
issue: JCI-3, JCI-6 # Comma separated list of issues being deployed/released. You are expected to generate this yourself in a previous step
64-
jira_instance: companyname # Subdomain for Jira Cloud
65-
client_id: ${{ secrets.JIRA_CLIENT_ID }}
66-
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
67-
```
68-
69-
## Use with Any Other CI/CD Providers
24+
## Use with Any CI/CD Provider with **Docker**
7025

7126
Supported in providers which support running arbitrary Docker images (like Drone, Gitlab CI).
7227

@@ -91,7 +46,7 @@ steps:
9146
- name: jira-integration
9247
image: boringdownload/jira-integration:v0
9348
environment:
94-
BUILD_NAME: drone-pipeline
49+
BUILD_NAME: drone-pipeline # or give any custom name
9550
JIRA_INSTANCE: companyname
9651
JIRA_CLIENT_ID:
9752
from_secret: jira_client_id
@@ -117,7 +72,7 @@ jira-build-integration-on-success:
11772
script: jira-integration
11873
variables:
11974
BUILD_STATE: successful
120-
BUILD_NAME: gitlab-pipeline-name
75+
BUILD_NAME: gitlab-pipeline-name # or give any custom name
12176
JIRA_INSTANCE: companyname
12277
12378
jira-build-integration-on-failure:
@@ -143,60 +98,100 @@ jira-deploy-integration-on-failure:
14398
name: production
14499
```
145100

101+
## Usage With Github Actions
102+
103+
[![test-release workflow](https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml/badge.svg)](https://github.com/rohit-gohri/jira-ci-cd-integration/actions/workflows/test-release.yml)
104+
105+
### Add OAuth Creds as secrets to Github
106+
107+
**See:** <https://docs.github.com/en/actions/reference/encrypted-secrets>
108+
109+
- Add Client ID as `JIRA_CLIENT_ID`
110+
- Add Client Secret as `JIRA_CLIENT_SECRET`
111+
112+
![Github Secrets](./docs/github-secrets.png)
113+
114+
### Update Github Workflow
115+
116+
#### Use in Builds Pipeline
117+
118+
```yaml
119+
- name: Jira Integration
120+
if: ${{ always() }}
121+
uses: rohit-gohri/jira-ci-cd-integration@v0
122+
with:
123+
state: ${{ job.status }}
124+
jira_instance: companyname # Subdomain for Jira Cloud
125+
client_id: ${{ secrets.JIRA_CLIENT_ID }}
126+
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
127+
```
128+
129+
#### Use in Deployment Pipeline
130+
131+
Just provide an evironment to send a deployment event instead of a build event.
132+
133+
```yaml
134+
- name: Jira Integration
135+
if: ${{ always() }}
136+
uses: rohit-gohri/jira-ci-cd-integration@v0
137+
with:
138+
state: ${{ job.status }}
139+
environment: staging
140+
issue: JCI-3, JCI-6 # Comma separated list of issues being deployed/released. You are expected to generate this yourself in a previous step
141+
jira_instance: companyname # Subdomain for Jira Cloud
142+
client_id: ${{ secrets.JIRA_CLIENT_ID }}
143+
client_secret: ${{ secrets.JIRA_CLIENT_SECRET }}
144+
```
145+
146146
## Options
147147

148-
Provide these options directly in case of Github Actions or via the env variable in the brackets for Docker.
148+
Provide these options via environment variables, or directly in case of Github Actions.
149149

150150
### Inputs
151151

152-
#### jira_instance (JIRA_INSTANCE)
152+
#### jira_instance: JIRA_INSTANCE
153153

154154
Sub Domain of Jira Cloud Instance. This part of the url: `https://<jira_instance>.atlassian.net`
155155

156-
#### client_id (JIRA_CLIENT_ID)
156+
#### client_id: JIRA_CLIENT_ID
157157

158158
ClientID of OAuth Creds
159159

160-
#### client_secret (JIRA_CLIENT_SECRET)
160+
#### client_secret: JIRA_CLIENT_SECRET
161161

162162
Client Secret of OAuth Creds
163163

164-
#### event_type (JIRA_EVENT_TYPE) (optional)
164+
#### event_type: JIRA_EVENT_TYPE (optional)
165165

166166
"build" or "deployment", (default is "build"). You can override this manually or just provide an `evironment` to send a deployment event instead of a build event.
167167

168-
#### state (BUILD_STATE) (optional)
168+
#### state: BUILD_STATE (optional)
169169

170170
"successful"/"success", "failed", or "canceled" (default is "successful")
171171

172-
#### issue (JIRA_ISSUES) (optional)
172+
#### issue: JIRA_ISSUES (optional)
173173

174174
Will be parsed from branch name automatically if absent. Or you can provide it according to your own logic. Can be multiple issues.
175175

176-
#### token (optional)
177-
178-
> Only for Github Action
179-
180-
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.
181-
182176
### Pipeline Info
183177

184-
#### Commit Message (COMMIT_MESSAGE)
178+
#### Commit Message: COMMIT_MESSAGE
185179

186-
If you have the jira id in the commit message then provide this.
180+
If the tool can't detect your commit message you may provide a value directly. If you have the jira id in the commit message, it will be parsed.
187181

188-
#### Pipeline Name (BUILD_NAME)
182+
#### Pipeline Name: BUILD_NAME
189183

190-
A name for your pipeline
184+
A custom name for your pipeline
191185

192-
#### Environment Name (BUILD_ENVIROMENT) (optional)
186+
#### Environment Name: BUILD_ENVIROMENT (optional)
193187

194188
> NOTE: Only for Deployment events
195189

196-
A name for your environment. We try to automatically infer this from your CI/CD provider.
190+
A name for your environment. The tool tries to automatically infer this from your CI/CD provider.
197191

198-
#### Environment Type (BUILD_ENVIROMENT_TYPE) (optional)
192+
#### Environment Type: BUILD_ENVIROMENT_TYPE (optional)
199193

200194
> NOTE: Automatically inferred from environment name
201195

202-
We try to automatically parse this from environment but if you want to override then provide one of (`unmapped`, `development`, `testing`, `staging`, `production`)
196+
The tool tries to automatically parse this from environment but if you want to override then provide one of (`unmapped`, `development`, `testing`, `staging`, `production`)
197+

0 commit comments

Comments
 (0)