forked from reactioncommerce/reaction
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request reactioncommerce#4638 from reactioncommerce/releas…
…e-2.0.0 Release 2.0.0-rc.1
- Loading branch information
Showing
587 changed files
with
10,784 additions
and
7,671 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,64 @@ | ||
#!/bin/bash | ||
|
||
sudo apt-get -y install python3-pip wget | ||
sudo apt-get -y install python3-pip wget jq | ||
sudo pip3 install awscli | ||
wget https://github.com/mikefarah/yq/releases/download/2.0.1/yq_linux_amd64 -O /tmp/yq | ||
sudo mv /tmp/yq /usr/local/bin/yq | ||
sudo chmod +x /usr/local/bin/yq | ||
|
||
if [ -z "${AWS_REGION}" ]; then | ||
AWS_REGION=us-west-2 | ||
AWS_REGION=us-west-2 | ||
fi | ||
|
||
if [ "${CLOUDFORMATION_AWS_ACCESS_KEY_ID}" ]; then | ||
AWS_ACCESS_KEY_ID=${CLOUDFORMATION_AWS_ACCESS_KEY_ID} | ||
fi | ||
ENVIRONMENT=staging | ||
SERVICE_DIR_NAME=.reaction/devops/aws/services | ||
SERVICES=$(ls ${SERVICE_DIR_NAME}) | ||
|
||
if [ "${CLOUDFORMATION_AWS_SECRET_ACCESS_KEY}" ]; then | ||
AWS_SECRET_ACCESS_KEY=${CLOUDFORMATION_AWS_SECRET_ACCESS_KEY} | ||
fi | ||
for SERVICE in $SERVICES; do | ||
DISABLED=$(echo $SERVICE | grep disabled) | ||
if [ "${DISABLED}" == "${SERVICE}" ]; then | ||
continue | ||
fi | ||
echo "START PROCESSING SERVICE ${SERVICE}" | ||
|
||
cd ${SERVICE_DIR_NAME}/${SERVICE} | ||
|
||
PROPEL_CONFIG_FILE="propel-${ENVIRONMENT}.yaml" | ||
if [ ! -f ${PROPEL_CONFIG_FILE} ]; then | ||
echo "Propel configuration file not found!" | ||
exit 1 | ||
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 | ||
AWS_ACCESS_KEY_ID=${!AWS_ACCESS_KEY_ID_VAR_NAME} | ||
fi | ||
|
||
if [ "${!AWS_SECRET_ACCESS_KEY_VAR_NAME}" ]; then | ||
AWS_SECRET_ACCESS_KEY=${!AWS_SECRET_ACCESS_KEY_VAR_NAME} | ||
fi | ||
|
||
mkdir -p ~/.aws | ||
echo "[default]" > ~/.aws/credentials | ||
echo "aws_access_key_id = ${AWS_ACCESS_KEY_ID}" >> ~/.aws/credentials | ||
echo "aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY}" >> ~/.aws/credentials | ||
|
||
echo "[default]" > ~/.aws/config | ||
echo "region = ${AWS_REGION}" >> ~/.aws/config | ||
|
||
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 | ||
|
||
aws s3 cp --recursive s3://${S3_ECS_DEPLOY_BUCKET}/devops . | ||
sudo mv propel /usr/local/bin/propel | ||
sudo chmod +x /usr/local/bin/propel | ||
|
||
find aws -name \*sh | xargs chmod +x | ||
cd aws/app | ||
./update-app-stack.sh core-service | ||
RELEASE_DESCRIPTION="CircleCI build URL: ${CIRCLE_BUILD_URL}" | ||
propel release create --deploy --descr "${RELEASE_DESCRIPTION}" -f ${PROPEL_CONFIG_FILE} | ||
|
||
echo "END PROCESSING SERVICE ${SERVICE}" | ||
|
||
cd - | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
METEOR@1.7.0.3 | ||
METEOR@1.8-rc.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.