Skip to content

Commit

Permalink
Merge pull request #4755 from reactioncommerce/release-2.0.0-rc.6
Browse files Browse the repository at this point in the history
Release 2.0.0 rc.6
  • Loading branch information
spencern authored Nov 14, 2018
2 parents f9fd923 + 7815d9d commit b49fbf0
Show file tree
Hide file tree
Showing 114 changed files with 5,101 additions and 3,680 deletions.
54 changes: 54 additions & 0 deletions .circleci/bin/ecs-deploy-feature-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash

sudo apt-get -y install python3-pip wget
sudo pip3 install awscli

export ENVIRONMENT=feat
export CLUSTER=core
export SERVICE_SUFFIX=$CIRCLE_BRANCH
export SERVICE1=reaction-core
export CONTAINER1=core
export core_CIRCLE_SHA1=$CIRCLE_SHA1

PROPEL_CONFIG_FILE="propel-feat.yaml"
if [ ! -f ${PROPEL_CONFIG_FILE} ]; then
echo "Propel configuration file not found!"
exit 1
fi

if [ -z "${AWS_REGION}" ]; then
export AWS_REGION=us-west-2
fi

ENV_NAME_UPPERCASE=$(echo $ENVIRONMENT | awk '{print toupper($0)}')
AWS_ACCESS_KEY_ID_VAR_NAME=CLOUDFORMATION_${ENV_NAME_UPPERCASE}_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY_VAR_NAME=CLOUDFORMATION_${ENV_NAME_UPPERCASE}_AWS_SECRET_ACCESS_KEY

if [ "${!AWS_ACCESS_KEY_ID_VAR_NAME}" ]; then
export AWS_ACCESS_KEY_ID=${!AWS_ACCESS_KEY_ID_VAR_NAME}
fi

if [ "${!AWS_SECRET_ACCESS_KEY_VAR_NAME}" ]; then
export AWS_SECRET_ACCESS_KEY=${!AWS_SECRET_ACCESS_KEY_VAR_NAME}
fi

echo Running aws s3 cp s3://${S3_PROPEL_ARTIFACTS_BUCKET}/propel-linux-amd64 ./propel
aws s3 cp s3://${S3_PROPEL_ARTIFACTS_BUCKET}/propel-linux-amd64 ./propel

sudo mv propel /usr/local/bin/propel
sudo chmod +x /usr/local/bin/propel

RELEASE_DESCRIPTION="CircleCI build URL: ${CIRCLE_BUILD_URL}"
propel param copy -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE1 --container $CONTAINER1 --suffix $SERVICE_SUFFIX --overwrite
propel param set ROOT_URL=https://${SERVICE1}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com/ -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE1 --container $CONTAINER1 --suffix $SERVICE_SUFFIX --overwrite
propel release create --deploy -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --descr "${RELEASE_DESCRIPTION}" --service $SERVICE1 --suffix $SERVICE_SUFFIX

export SERVICE2=storefront
export CONTAINER2=storefront
propel param copy -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel param set CANONICAL_URL=https://${SERVICE1}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel param set OAUTH2_REDIRECT_URL=https://${SERVICE2}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com/callback -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel param set OAUTH2_IDP_HOST_URL=https://${SERVICE1}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel param set EXTERNAL_GRAPHQL_URL=https://${SERVICE1}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com/graphql-alpha -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel param set INTERNAL_GRAPHQL_URL=https://${SERVICE1}-${SERVICE_SUFFIX}.$ENVIRONMENT.reactioncommerce.com/graphql-alpha -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --service $SERVICE2 --container $CONTAINER2 --suffix $SERVICE_SUFFIX --overwrite
propel release create --deploy -f ${PROPEL_CONFIG_FILE} --env $ENVIRONMENT --cluster $CLUSTER --descr "${RELEASE_DESCRIPTION}" --service $SERVICE2 --suffix $SERVICE_SUFFIX
39 changes: 39 additions & 0 deletions .circleci/bin/ecs-deploy-release-branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

sudo apt-get -y install python3-pip wget
sudo pip3 install awscli

export ENVIRONMENT=staging
export CLUSTER=core
export core_CIRCLE_SHA1=$CIRCLE_SHA1

PROPEL_CONFIG_FILE="propel.yaml"
if [ ! -f ${PROPEL_CONFIG_FILE} ]; then
echo "Propel configuration file not found!"
exit 1
fi

if [ -z "${AWS_REGION}" ]; then
export AWS_REGION=us-west-2
fi

ENV_NAME_UPPERCASE=$(echo $ENVIRONMENT | awk '{print toupper($0)}')
AWS_ACCESS_KEY_ID_VAR_NAME=CLOUDFORMATION_${ENV_NAME_UPPERCASE}_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY_VAR_NAME=CLOUDFORMATION_${ENV_NAME_UPPERCASE}_AWS_SECRET_ACCESS_KEY

if [ "${!AWS_ACCESS_KEY_ID_VAR_NAME}" ]; then
export AWS_ACCESS_KEY_ID=${!AWS_ACCESS_KEY_ID_VAR_NAME}
fi

if [ "${!AWS_SECRET_ACCESS_KEY_VAR_NAME}" ]; then
export AWS_SECRET_ACCESS_KEY=${!AWS_SECRET_ACCESS_KEY_VAR_NAME}
fi

echo Running aws s3 cp s3://${S3_PROPEL_ARTIFACTS_BUCKET}/propel-linux-amd64 ./propel
aws s3 cp s3://${S3_PROPEL_ARTIFACTS_BUCKET}/propel-linux-amd64 ./propel

sudo mv propel /usr/local/bin/propel
sudo chmod +x /usr/local/bin/propel

RELEASE_DESCRIPTION="CircleCI build URL: ${CIRCLE_BUILD_URL}"
propel release create --deploy --env $ENVIRONMENT --cluster $CLUSTER --descr "${RELEASE_DESCRIPTION}"
64 changes: 0 additions & 64 deletions .circleci/bin/ecs-deploy.sh

This file was deleted.

28 changes: 22 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,24 @@ jobs:
echo "No deploy for forks"
fi
deploy-to-ecs:
deploy-to-ecs-release-branch:
<<: *defaults
steps:
- checkout
- run:
name: Deploy new task definition and update service in ECS
command: |
.circleci/bin/ecs-deploy.sh
.circleci/bin/ecs-deploy-release-branch.sh
no_output_timeout: 30m

deploy-to-ecs-feature-branch:
<<: *defaults
steps:
- checkout
- run:
name: Deploy new task definition and update service in ECS
command: |
.circleci/bin/ecs-deploy-feature-branch.sh
no_output_timeout: 30m

deploy-docs:
Expand Down Expand Up @@ -336,12 +346,18 @@ workflows:
context: reaction-publish-docker
requires:
- docker-build
- deploy-to-ecs:
- deploy-to-ecs-release-branch:
requires:
- docker-push
# filters:
# branches:
# only: /^release-2\.0.\d+$/
filters:
branches:
only: /^release-2.*/
- deploy-to-ecs-feature-branch:
requires:
- docker-push
filters:
branches:
only: /^feat.*/
- deploy-docs:
requires:
- test-unit
Expand Down
11 changes: 11 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
REACTION_EMAIL=[email protected]
REACTION_AUTH=somepassword
REACTION_USER=ReactionAdmin
MONGO_URL=mongodb://mongo:27017/reaction
MONGO_OPLOG_URL=mongodb://mongo:27017/local
ROOT_URL=http://localhost:3000
HYDRA_ADMIN_URL=http://hydra:4445
HYDRA_TOKEN_URL=http://hydra:4444/oauth2/token
HYDRA_OAUTH2_INTROSPECT_URL=http://hydra:4445/oauth2/introspect
OAUTH2_CLIENT_DOMAINS=http://localhost:4000
SKIP_FIXTURES=1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
.fileStorage/
.vscode
.idea
.env
.env*
!.env.example
.c9
*.csv
*.dat
Expand Down
26 changes: 13 additions & 13 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ [email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected]-rc18.14 # Enable ECMAScript2015+ syntax in app code
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # ensure meteor method argument validation
[email protected] # security-related policies enforced by newer browsers
juliancwirko:[email protected] # CSS post-processing plugin (replaces standard-minifier-css)
[email protected] # ReactiveDict whose contents are preserved across Hot Code Push
[email protected] # Meteor transparent reactive programming library
[email protected]-rc18.14
[email protected]
[email protected]
[email protected]
[email protected]
Expand All @@ -27,22 +27,22 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected]-rc18.14
[email protected]
[email protected]
mdg:validated-method
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]
[email protected]
[email protected]

# Meteor Auth Packages
[email protected]-rc18.14
[email protected]
[email protected]
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]-rc18.14
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

# Community Packages
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected]-rc.14
[email protected]
Loading

0 comments on commit b49fbf0

Please sign in to comment.