- Install ngrok via
brew - Clone down the repository.
- Install Dependencies
npm installoryarnnpm install -g serverless
- Generate a Github API Token
- Go to https://github.com/settings/tokens
- Click Generate New Token
- Check
repoandadmin:repo_hook - Copy the output
- Start the offline serverless runtime
github_token=<your_github_token> sls offline startngrok http 3000
- Set up a test repository on your personal Github.
- Create repo.
- Go to Settings > Webhooks
- Add a webhook.
- Put the ngrok Forwarding URL, followed by
/githubin Payload URL (http://123.ngrok.io/github) - Set Content Type to
application/json - Select "Send me everything."
- Select "Active"
- Click "Add Webhook"
- Setup config
- In
./config.jsonadd an object with:- Your github username
- Your test repository
- Config options for the functionality you're going to test
- In
- Add webhook: Do first
- In Jira go to Settings -> System -> Advanced -> Webhooks
- Create a new webhook, copying the config for the [Sample] webhook.
- testing ticket -> done
- Have an admin go to Workflows -> XYZ -> Edit Workflow -> Diagram
- Select "Post Functions" on the "approve" transition.
- Select "add a post function"
- Select "trigger a webhook"
- Select your dev webhook.
Deployment is done automatically in the circle.yml file.
All a deployment needs is a valid AWS config, with credentials that have the access to the following:
- Lambda
- API Gateway
- S3
- Cloudwatch
Then, deployments are triggerd using the sls deploy command with additional optional environmental targets.