Skip to content

Commit 8c390a9

Browse files
authored
Merge pull request #651 from reactioncommerce/lambda-webhook-for-gitops-pr
Use Lambda webhook for automated PR creation and merging into reaction-gitops
2 parents 47a7708 + e4ff593 commit 8c390a9

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.circleci/config.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# in all future steps.
44
#
55
# Assumes that the Docker image is published to Docker Hub.
6-
version: 2
6+
version: 2.1
7+
8+
orbs:
9+
webhook: eddiewebb/webhook@volatile
710

811
# The following stanza defines a map named defaults with a variable that may be
912
# inserted using the YAML merge (<<: *) key later in the file to save some
@@ -13,9 +16,8 @@ defaults: &defaults
1316
- CI_SCRIPTS: "npx --quiet --package @reactioncommerce/[email protected]"
1417
- DOCKER_REPOSITORY: "reactioncommerce/example-storefront"
1518
- DOCKER_NAME: "example-storefront"
19+
- GITOPS_PR_WEBHOOK: "https://w603b5hwp1.execute-api.us-east-1.amazonaws.com/dev/pullrequests"
1620
- GLOBAL_CACHE_VERSION: “v3”
17-
- SERVICE: "reaction-storefront"
18-
- REACTION_GITOPS_REVIEWERS: "wistonk,griggheo"
1921
docker:
2022
- image: circleci/node:12-stretch
2123

@@ -83,6 +85,8 @@ jobs:
8385
- run:
8486
name: Build and push production Docker image
8587
command: ${CI_SCRIPTS} docker-build-tag-push . ${DOCKER_REPOSITORY}
88+
- webhook/notify:
89+
endpoint: "${GITOPS_PR_WEBHOOK}"
8690

8791
create-gitops-pull-request:
8892
<<: *defaults
@@ -111,10 +115,3 @@ workflows:
111115
- dockerfile-lint
112116
- eslint
113117
- test-unit
114-
- create-gitops-pull-request:
115-
context: reaction-gitops
116-
requires:
117-
- docker-build-push
118-
filters:
119-
branches:
120-
only: /^trunk$/

0 commit comments

Comments
 (0)