Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into release-v3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rosshadden committed Dec 9, 2019
2 parents 574b8ba + 87da2c8 commit af4456f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 43 deletions.
49 changes: 9 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,14 @@ version: 2
# typing. See http://yaml.org/type/merge.html for details.
defaults: &defaults
environment:
CI_SCRIPTS: 'npx --quiet --package @reactioncommerce/ci-scripts@1.6.2'
DOCKER_REPOSITORY: "reactioncommerce/example-storefront"
DOCKER_NAMESPACE: "reactioncommerce"
DOCKER_NAME: "example-storefront"
GLOBAL_CACHE_VERSION: "v3"
KUSTOMIZE_VERSION: "3.2.1"
HUB_VERSION: "2.12.8"
GH_USERNAME: "rc-circleci"
GH_EMAIL: "circleci@reactioncommerce.com"
REACTION_GITOPS_REVIEWERS: "griggheo"
- CI_SCRIPTS: "npx --quiet --package @reactioncommerce/ci-scripts@1.9.1"
- DOCKER_REPOSITORY: "reactioncommerce/example-storefront"
- DOCKER_NAME: "example-storefront"
- GLOBAL_CACHE_VERSION: “v3”
- SERVICE: "reaction-storefront"
- REACTION_GITOPS_REVIEWERS: "wistonk,griggheo"
docker:
- image: circleci/node:12.11.1-stretch
- image: circleci/node:12-stretch

jobs:
install-dependencies:
Expand Down Expand Up @@ -94,35 +90,7 @@ jobs:
- run:
name: Clone reaction-gitops repo and create PR
command: |
# Download kustomize
cd /tmp
wget https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_kustomize.v${KUSTOMIZE_VERSION}_linux_amd64
sudo mv kustomize_kustomize.v${KUSTOMIZE_VERSION}_linux_amd64 /usr/local/bin/kustomize
sudo chmod +x /usr/local/bin/kustomize
# Download hub
wget https://github.com/github/hub/releases/download/v${HUB_VERSION}/hub-linux-amd64-${HUB_VERSION}.tgz
tar xfz hub-linux-amd64-${HUB_VERSION}.tgz
sudo mv hub-linux-amd64-${HUB_VERSION}/bin/hub /usr/local/bin/hub
sudo chmod +x /usr/local/bin/hub
# Clone reaction-gitops repo and configure username and email for signing off commits
export GITHUB_TOKEN="${REACTION_GITOPS_GH_TOKEN}"
/usr/local/bin/hub clone https://${GITHUB_TOKEN}@github.com/reactioncommerce/reaction-gitops.git
cd reaction-gitops
/usr/local/bin/hub config user.name "${GH_USERNAME}"
/usr/local/bin/hub config user.email "${GH_EMAIL}"
cd kustomize/reaction-storefront/overlays/staging
# Create new branch
/usr/local/bin/hub checkout -b update-image-reaction-storefront-${CIRCLE_SHA1}
# Modify image tag in kustomization.yaml by calling 'kustomize edit set image'
/usr/local/bin/kustomize edit set image docker.io/${DOCKER_REPOSITORY}:${CIRCLE_SHA1}
/usr/local/bin/hub add kustomization.yaml
# Commit with sign-off
/usr/local/bin/hub commit -s -m "changed reaction-storefront image tag to ${CIRCLE_SHA1}"
# Push branch to origin
/usr/local/bin/hub push --set-upstream origin update-image-reaction-storefront-${CIRCLE_SHA1}
# Create PR
/usr/local/bin/hub pull-request --no-edit -r ${REACTION_GITOPS_REVIEWERS}
${CI_SCRIPTS} automate-gitops-pull-request
workflows:
version: 2
build_and_test:
Expand All @@ -144,6 +112,7 @@ workflows:
- eslint
- test-unit
- create-gitops-pull-request:
context: reaction-gitops
requires:
- docker-build-push
filters:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Example Storefront v2.9.0 is a minor update to keep this project in sync with [Reaction v2.9.0](https://github.com/reactioncommerce/reaction) and [reaction-hydra v2.9.0](https://github.com/reactioncommerce/reaction-hydra)

# v2.8.1

Example Storefront v2.8.1 is a patch update to keep this project in sync with [Reaction v2.8.1](https://github.com/reactioncommerce/reaction) and [reaction-hydra v2.8.1](https://github.com/reactioncommerce/reaction-hydra)

# v2.8.0

Example Storefront v2.8.0 is a minor update to keep this project in sync with [Reaction v2.8.0](https://github.com/reactioncommerce/reaction) and [reaction-hydra v2.8.0](https://github.com/reactioncommerce/reaction-hydra)
Expand Down
6 changes: 3 additions & 3 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
env_file=${__dir}/../.env
env_example_file=${__dir}/../.env.example
cd "$(dirname "${BASH_SOURCE[0]}")/.."
env_file=./.env
env_example_file=./.env.example

function main {
set -e
Expand Down

0 comments on commit af4456f

Please sign in to comment.