Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noredink/recurring-stories-lambda
Lambda function to create recurring Pivotal Tracker or Targetprocess stories
https://github.com/noredink/recurring-stories-lambda
Last synced: about 2 months ago
JSON representation
Lambda function to create recurring Pivotal Tracker or Targetprocess stories
- Host: GitHub
- URL: https://github.com/noredink/recurring-stories-lambda
- Owner: NoRedInk
- License: bsd-3-clause
- Created: 2017-12-11T05:01:22.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:01:30.000Z (about 2 years ago)
- Last Synced: 2024-05-08T23:23:03.808Z (8 months ago)
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Create recurring Pivotal Tracker or Targetprocess stories with AWS Lambda.
1. Copy config.json.sample to config.json and configure the following as needed:
- `ssm_pt_token_path`: Name of SSM Parameter Store parameter to store
your API token for Pivotal Tracker
- `ssm_tp_token_path`: Name of SSM Parameter Store parameter to store
your service token for Targetprocess
- `ssm_tp_domain`: Name of SSM Parameter Store parameter to store
your Targetprocess domain (example of a value: `md5.tpondemand.com`)
- `ssm_aws_region`: Region of SSM Parameter Store to use
- `rules`: Keys of this object correspond to the CloudWatch Events rules
you set up later. The values define which project to create the story in
and other attributes of the story.
2. Package up `main.py` and `config.json` and deploy as an AWS Lambda function.
3. Allow the Lambda function to call `ssm:GetParameter`
by attaching the appropriate IAM role policy.
4. Put required SSM parameters:
```
# for Pivotal Tracker
aws --region=region-configured-in-config-json \
ssm put-parameter \
--name "/name-configured-in-config-json" \
--value "your-tracker-api-token" \
--type SecureString
# for Targetprocess
aws --region=region-configured-in-config-json \
ssm put-parameter \
--name "/name-configured-in-config-json" \
--value "your-targetprocess-service-token" \
--type SecureString
aws --region=region-configured-in-config-json \
ssm put-parameter \
--name "/name-configured-in-config-json" \
--value "your-targetprocess-domain" \
--type SecureString
```
5. [Set up CloudWatch Event rules](http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html)
to trigger the Lambda function with the desired frequency.## Running tests
```
virtualenv env
. env/bin/activate
pip install -r requirements.txt
pip install -r dev-requirements.txt
pytest tests.py
```## Upgrading a dependency
```
pip-compile --upgrade-package my-package
```