Skip to content

Commit 7ff8961

Browse files
committed
Bump jira to 3.4.1
1 parent f8d3416 commit 7ff8961

File tree

4 files changed

+77
-41
lines changed

4 files changed

+77
-41
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 2.0.0
4+
5+
- [#48](https://github.com/StackStorm-Exchange/stackstorm-jira/issues/48) Update `jira==3.4.1`
6+
37
## 1.1.0
48

59
- Add PAT-based authentication (PR #47)

README.md

+70-39
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# JIRA integration pack
1+
# Jira integration pack
22

3-
This pack consists of a sample JIRA sensor and a JIRA action.
3+
This pack consists of a sample Jira sensor and a Jira action.
44

55
## Installation
66

7-
You will need to have `gcc` installed on your system. For Ubuntu systems, run `sudo apt-get install gcc`. For Redhat/CentOS
8-
systems, run `sudo yum install gcc libffi-devel python-devel openssl-devel`. To build the python cryptography dependency (part of the following `st2 pack install` command) 2GB of RAM is recommended. In some cases adding a swap file may eliminate strange gcc compiler errors.
7+
You will need to have `gcc` installed on your system.
8+
For Ubuntu systems, run `sudo apt-get install gcc`.
9+
For Redhat/CentOS systems, run `sudo yum install gcc libffi-devel python-devel openssl-devel`.
10+
To build the python cryptography dependency (part of the following `st2 pack install` command) 2GB of RAM is recommended.
11+
In some cases adding a swap file may eliminate strange gcc compiler errors.
912

1013
Then install this pack with: `st2 pack install jira`
1114

@@ -14,24 +17,27 @@ Then install this pack with: `st2 pack install jira`
1417
Copy the example configuration in [jira.yaml.example](./jira.yaml.example)
1518
to `/opt/stackstorm/configs/jira.yaml` and edit as required.
1619

17-
* ``url`` - URL of the JIRA instance (e.g. ``https://myproject.atlassian.net``)
20+
* ``url`` - URL of the Jira instance (e.g. ``https://myproject.atlassian.net``)
1821
* ``poll_interval`` - Polling interval - default 30s
1922
* ``project`` - Key of the project which will be used as a default with some of the actions which
2023
don't require or allow you to specify a project (e.g. ``STORM``).
2124
* ``verify`` - Verify SSL certificates. Default True. Set to False to disable verification
2225
* ``auth_method`` - Specify either `basic`, `oauth` or `PAT` authentication
2326

2427
Include the following settings when using the `oauth` auth_method:
28+
2529
* ``rsa_cert_file`` - Path to the file with a private key
2630
* ``oauth_token`` - OAuth token
2731
* ``oauth_secret`` - OAuth secret
2832
* ``consumer_key`` - Consumer key
2933

3034
Include the following settings when using the `basic` auth_method:
35+
3136
* ``username`` - Username
3237
* ``password`` - Password
3338

3439
Include the following settings when using the `PAT` auth_method:
40+
3541
* ``token`` - PAT token
3642

3743
If using the `oauth` auth_method, take a look at the OAuth section below for further setup instructions.
@@ -47,49 +53,74 @@ You can also use dynamic values from the datastore. See the
4753

4854
### Disclaimer
4955

50-
This documentation is written as of 06/17/2014. JIRA 6.3 implements OAuth1. Most of this doc would need to be revised when JIRA switches to OAuth2.
56+
This documentation is written as of 06/17/2014.
57+
Jira 6.3 implements OAuth1.
58+
Most of this document would need to be revised when Jira switches to OAuth2.
5159

5260
### Steps
5361

5462
1. Generate RSA public/private key pair
55-
```
56-
# This will create a 2048 length RSA private key
57-
$openssl genrsa -out mykey.pem 2048
58-
```
59-
60-
```
61-
# Now, create the public key associated with that private key
62-
openssl rsa -in mykey.pem -pubout
63-
```
64-
2. Generate a consumer key. You can use python uuid.uuid4() to do this, for example:
65-
66-
```
67-
$ python
68-
Python 2.7.10 (default, Jul 30 2016, 19:40:32)
69-
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
70-
Type "help", "copyright", "credits" or "license" for more information.
71-
>>> import uuid
72-
>>> print uuid.uuid4()
73-
210660f1-ca8a-40d5-a6ee-295ccbf3074d
74-
>>>
75-
```
76-
77-
3. Configure JIRA for external access:
78-
* Go to AppLinks section of your JIRA - https://JIRA_SERVER/plugins/servlet/applinks/listApplicationLinks
79-
* Create a Generic Application with some fake URL
80-
* Click Edit, hit IncomingAuthentication. Plug in the consumer key and RSA public key you generated.
81-
4. Get access token using this [script](https://github.com/lakshmi-kannan/jira-oauth-access-token-generator/blob/master/generate_access_token.py). You may need to install additional libraries to run that script, and you
82-
will need to edit the script to use your file locations. Check the [README](https://github.com/lakshmi-kannan/jira-oauth-access-token-generator/blob/master/README.md) file for more information.
83-
The access token is printed at the end of running that script. Save these keys somewhere safe.
84-
5. Plug in the access token and access secret into the sensor or action. You are good to make JIRA calls. Note: OAuth token expires. You'll have to repeat the process based on the expiry date.
63+
64+
```shell
65+
$ openssl genrsa -out stackstorm-jira.pem 4096
66+
```
67+
68+
2. Create the public key associated with that private key
69+
70+
```shell
71+
$ openssl rsa -in stackstorm-jira.pem -pubout
72+
```
73+
74+
3. Generate a consumer key. You can use python uuid.uuid4() to do this, for example:
75+
76+
```shell
77+
$ python
78+
Python 2.7.10 (default, Jul 30 2016, 19:40:32)
79+
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
80+
Type "help", "copyright", "credits" or "license" for more information.
81+
>>> import uuid
82+
>>> print uuid.uuid4()
83+
210660f1-ca8a-40d5-a6ee-295ccbf3074d
84+
>>>
85+
```
86+
87+
4. Configure Jira for external access:
88+
89+
* Go to AppLinks section of your Jira at `https://{jira_server}/plugins/servlet/applinks/listApplicationLinks`
90+
* Create a Generic Application with some fake URL
91+
* Click Edit, choose IncomingAuthentication, plug in the consumer key and RSA public key you generated.
92+
93+
5. Get access token using this [script](https://github.com/lakshmi-kannan/jira-oauth-access-token-generator/blob/master/generate_access_token.py).
94+
You may need to install additional libraries to run that script, and you will need to edit the script to use your file locations.
95+
Check the [README](https://github.com/lakshmi-kannan/jira-oauth-access-token-generator/blob/master/README.md) file for more information.
96+
The access token is printed at the end of running that script.
97+
Save these keys somewhere safe.
98+
99+
6. Plug in the access token and access secret into the sensor or action.
100+
You are good to make Jira calls.
101+
Note: OAuth token expires.
102+
You'll have to repeat the process based on the expiry date.
85103

86104
## Sensors
87105

88-
### JiraSensor
106+
* ``JiraSensor`` - Sensor which monitors JIRA for new tickets.
107+
* ``JiraSensorForAPIv2`` - Sensor which monitors JIRA for new tickets.
89108

90109
The sensor monitors for new tickets and sends a trigger into the system whenever there is a new ticket.
91110

92111
## Actions
93112

94-
* ``create_issue`` - Action which creates a new JIRA issue.
95-
* ``get_issue`` - Action which retrieves details for a particular issue.
113+
* ``add_field_value`` - Add a field to a particular JIRA issue.
114+
* ``assign_issue`` - Assigning an issue to a user.
115+
* ``attach_file_to_issue`` - Attach a file to JIRA issue / ticket.
116+
* ``attach_files_to_issue`` - Attach multiple files to JIRA issue / ticket.
117+
* ``comment_issue`` - Comment on a JIRA issue / ticket.
118+
* ``create_issue`` - Create a new JIRA issue / ticket.
119+
* ``get_issue`` - Retrieve information about a particular JIRA issue.
120+
* ``get_issue_attachments`` - Retrieve attachments for a particular JIRA issue.
121+
* ``get_issue_comments`` - Retrieve comments for a particular JIRA issue.
122+
* ``link_issue`` - Link one JIRA issue to another JIRA issue.
123+
* ``search_issues`` - Search JIRA issues with a JQL query.
124+
* ``transition_issue`` - Do a transition on a JIRA issue / ticket.
125+
* ``transition_issue_by_name`` - Do a transition on a JIRA issue / ticket.
126+
* ``update_field_value`` - Update a field in a particular JIRA issue.

pack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords:
66
- issues
77
- ticket management
88
- project management
9-
version: 1.1.0
9+
version: 2.0.0
1010
python_versions:
1111
- "3"
1212
author : StackStorm, Inc.

requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
jira==2.0.0
1+
jira==3.4.1
2+
pyjwt==2.6.0

0 commit comments

Comments
 (0)