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

chore: update master mentions to main #188

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ workflows:
filters:
branches:
only:
- master
- main
- production
- fix-ci
context: echo
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# echo

- **Depfu :** [![Depfu](https://badges.depfu.com/badges/433c73edca24a04a7cefd5441a84b774/count.svg)](https://depfu.com/github/artsy/echo?project_id=30287)
- **CI :** [![Build Status](https://circleci.com/gh/artsy/echo/tree/master.svg?style=shield&circle-token=f7a3e9b08ab306cd01a15da49933c0774d508ecb)](https://circleci.com/gh/artsy/echo)


# echo

- **Depfu :** [![Depfu](https://badges.depfu.com/badges/433c73edca24a04a7cefd5441a84b774/count.svg)](https://depfu.com/github/artsy/echo?project_id=30287)
- **CI :** [![Build Status](https://circleci.com/gh/artsy/echo/tree/main.svg?style=shield&circle-token=f7a3e9b08ab306cd01a15da49933c0774d508ecb)](https://circleci.com/gh/artsy/echo)

[echo](http://github.com/artsy/echo) is an API service that provides remote configuration for Artsy mobile clients. It works using a json file and some scripts to upload it to s3.

Expand Down
6 changes: 3 additions & 3 deletions README_engineers.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## How does https://echo.artsy.net/Echo.json work?

This happens in 4 steps:
- The source of truth is [this repo](https://github.com/artsy/echo). That's where the latest config file exists [here](https://github.com/artsy/echo/blob/master/Echo.json5).
- CircleCI does deploys using the [deploy.sh](https://github.com/artsy/echo/blob/master/scripts/deploy.sh) and some [env vars](https://app.circleci.com/settings/project/github/artsy/echo/environment-variables) and the [echo context](https://app.circleci.com/settings/organization/github/artsy/contexts/235a9fec-2662-424c-9996-e4e363a17de1)

- The source of truth is [this repo](https://github.com/artsy/echo). That's where the latest config file exists [here](https://github.com/artsy/echo/blob/main/Echo.json5).
- CircleCI does deploys using the [deploy.sh](https://github.com/artsy/echo/blob/main/scripts/deploy.sh) and some [env vars](https://app.circleci.com/settings/project/github/artsy/echo/environment-variables) and the [echo context](https://app.circleci.com/settings/organization/github/artsy/contexts/235a9fec-2662-424c-9996-e4e363a17de1)
The deploy basically prepares the json file and uploads it to the s3 `artsy-public` bucket, under the `eigen` directory. It uploads 2 copies, one which is the main file users will be accessing, and a second copy which is mainly for reference/backup of our changes in that config file. The bucket is [here](https://s3.console.aws.amazon.com/s3/buckets/artsy-public/eigen/?region=us-east-1&tab=overview)
The context credentials come from the `artsy-echo` IAM user, created based on [these docs](https://www.notion.so/artsy/Adding-New-IAM-Profiles-98884ccf1f0744e3862104e661445d65) and the creds are under `artsy-echo IAM Keypair` in our password manager.
- Cloudfront is used to serve the directory `s3:artsy-public/eigen` under a domain name like `xxxxx.cloudfront.net` and allowing access from echo.artsy.net.
- Cloudflare is using a CNAME to point `echo`(`.artsy.net`) to the above domain name (`xxxxx.cloudfront.net`) .


⚠️ **NOTE** ⚠️: Everything in the Echo.json file is public and visible by anyone with the url below. This file should **not** be used to store/deliver any sensitive values/keys. Even if values are stored in circleci and then replaced in the final file, the values are still visible to the world.
4 changes: 2 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euxo pipefail


BRANCH_DEPLOYING_TO_STAGING=master
BRANCH_DEPLOYING_TO_STAGING=main
BRANCH_DEPLOYING_TO_PRODUCTION=production

NAME_POSTFIX=
Expand All @@ -12,7 +12,7 @@ if [[ "$CURRENT_BRANCH" == "$BRANCH_DEPLOYING_TO_STAGING" ]]; then
elif [[ "$CURRENT_BRANCH" == "$BRANCH_DEPLOYING_TO_PRODUCTION" ]]; then
NAME_POSTFIX=
else
echo "Not in master or production branches. Not deploying."
echo "Not in main or production branches. Not deploying."
exit 255
fi

Expand Down