Skip to content

CharlieBliss/WebhookTest

Repository files navigation

Table of contents:

  1. Getting Started
  2. Deployment

Getting Started:

  1. Install ngrok via brew
  2. Clone down the repository.
  3. Install Dependencies
    • npm install or yarn
    • npm install -g serverless
  4. Generate a Github API Token
  5. Start the offline serverless runtime
    • github_token=<your_github_token> sls offline start
    • ngrok http 3000

Github

  1. 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 /github in Payload URL (http://123.ngrok.io/github)
    • Set Content Type to application/json
    • Select "Send me everything."
    • Select "Active"
    • Click "Add Webhook"
  2. Setup config
    • In ./config.json add an object with:
      • Your github username
      • Your test repository
      • Config options for the functionality you're going to test

Jira

  1. Add webhook: Do first
    • In Jira go to Settings -> System -> Advanced -> Webhooks
    • Create a new webhook, copying the config for the [Sample] webhook.
  2. 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

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:

  1. Lambda
  2. API Gateway
  3. S3
  4. Cloudwatch

Then, deployments are triggerd using the sls deploy command with additional optional environmental targets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published