Skip to content

Commit

Permalink
Merge pull request #651 from reactioncommerce/lambda-webhook-for-gito…
Browse files Browse the repository at this point in the history
…ps-pr

Use Lambda webhook for automated PR creation and merging into reaction-gitops
  • Loading branch information
griggheo committed Jan 28, 2020
2 parents 47a7708 + e4ff593 commit 8c390a9
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# in all future steps.
#
# Assumes that the Docker image is published to Docker Hub.
version: 2
version: 2.1

orbs:
webhook: eddiewebb/webhook@volatile

# The following stanza defines a map named defaults with a variable that may be
# inserted using the YAML merge (<<: *) key later in the file to save some
Expand All @@ -13,9 +16,8 @@ defaults: &defaults
- CI_SCRIPTS: "npx --quiet --package @reactioncommerce/ci-scripts@1.9.1"
- DOCKER_REPOSITORY: "reactioncommerce/example-storefront"
- DOCKER_NAME: "example-storefront"
- GITOPS_PR_WEBHOOK: "https://w603b5hwp1.execute-api.us-east-1.amazonaws.com/dev/pullrequests"
- GLOBAL_CACHE_VERSION: “v3”
- SERVICE: "reaction-storefront"
- REACTION_GITOPS_REVIEWERS: "wistonk,griggheo"
docker:
- image: circleci/node:12-stretch

Expand Down Expand Up @@ -83,6 +85,8 @@ jobs:
- run:
name: Build and push production Docker image
command: ${CI_SCRIPTS} docker-build-tag-push . ${DOCKER_REPOSITORY}
- webhook/notify:
endpoint: "${GITOPS_PR_WEBHOOK}"

create-gitops-pull-request:
<<: *defaults
Expand Down Expand Up @@ -111,10 +115,3 @@ workflows:
- dockerfile-lint
- eslint
- test-unit
- create-gitops-pull-request:
context: reaction-gitops
requires:
- docker-build-push
filters:
branches:
only: /^trunk$/

0 comments on commit 8c390a9

Please sign in to comment.