Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Lambda webhook for automated PR creation and merging into reaction-gitops #651

Merged
merged 2 commits into from
Jan 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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$/