Skip to content
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
Binary file removed .env.production
Binary file not shown.
Binary file removed .env.production-ro
Binary file not shown.
Binary file removed .env.shared
Binary file not shown.
Binary file removed .env.staging
Binary file not shown.
4 changes: 0 additions & 4 deletions .git-crypt/.gitattributes

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 0 additions & 13 deletions .gitattributes

This file was deleted.

13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,18 @@ node_modules
/.kotlin/

.env
!.env.**.example

# Local secrets.
.env.shared
.env.ci
.env.ci-app
.env.staging
.env.production
.env.production-ro
.env.migrator
infra/.env.production
internal/.env.ci
internal/standup-bot/.env.production

# Ignore the static folder, it will be generated in the build process for production use.
**/static/*
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ This repository is a monorepo that contains many different pieces of Codebloom,
- Our internal tools (e.g. custom Ink CLI scripts & our internal standup bot) are currently being written in [Rust](https://rust-lang.org/) and [TypeScript](https://typescriptlang.org)
- [Goto `internal/`](./internal/)
- [View detailed documentation](./internal/README.md)
- Our secrets across all environments which are decryped with [git-crypt](https://github.com/AGWA/git-crypt).
- [Goto `example.env`](./example.env)
- Environment secrets live in local env files generated from Azure.
- [View detailed documentation](./docs/local/SECRET.md)

## Setup
Expand Down
60 changes: 15 additions & 45 deletions docs/local/SECRET.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,19 @@
# Prerequisites
# Secrets

Please ensure that you install the following (homebrew is a recommendation but not a requirement):
Local environment files come from Azure. Git does not store them.

1. Install `gpg`
[Setup](./SETUP.md) covers the rest of local setup.

```bash
brew install gpg
```
These files stay on your machine:

1. Install `git-crypt`

```bash
brew install git-crypt
```

# New Codebloom Developer (needs access)

If you don't have access to environment secrets yet, you need to generate a public GPG key and add it to your GitHub profile. If you know what you are doing, you can choose to do so manually. Else, Codebloom has a script you can run to do it for you instead. Please run:

```
just git-crypt-generate-key
```

After getting access,
from your main branch:
run:

```
git pull
```

then run:

```
git-crypt unlock
```

and follow the instructions inside the script.

# Existing Codebloom Developer (has access)

Once the new developer has generated a key, please run:

```
just git-crypt-add-user
```

and follow the instructions inside the script.
- `.env`
- `.env.shared`
- `.env.ci`
- `.env.ci-app`
- `.env.staging`
- `.env.production`
- `.env.production-ro`
- `.env.migrator`
- `infra/.env.production`
- `internal/.env.ci`
- `internal/standup-bot/.env.production`
3 changes: 1 addition & 2 deletions docs/local/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ You can feel free to use any viewer you want, but we would recommend [DataGrip](

# Secrets

You can speed up the setup process by making a copy of `.env.example` to `.env`.
You will also find explanations and documentation about how to source the value for each key.
Local `.env` comes from Azure.

If there is a key specific to an environment (such as `CI` or `staging` environment), please consult the tech docs within the `CI` group.
34 changes: 0 additions & 34 deletions example.env.ci

This file was deleted.

40 changes: 0 additions & 40 deletions example.env.ci-app

This file was deleted.

4 changes: 0 additions & 4 deletions example.env.migrator

This file was deleted.

44 changes: 0 additions & 44 deletions example.env.production

This file was deleted.

7 changes: 0 additions & 7 deletions example.env.production-ro

This file was deleted.

71 changes: 0 additions & 71 deletions example.env.staging

This file was deleted.

Binary file removed infra/.env.production
Binary file not shown.
8 changes: 0 additions & 8 deletions infra/.env.production.example

This file was deleted.

Binary file removed internal/.env.ci
Binary file not shown.
7 changes: 0 additions & 7 deletions internal/example.env.ci

This file was deleted.

10 changes: 0 additions & 10 deletions internal/leetcode-auth-stealer-service/.env.example

This file was deleted.

Binary file removed internal/standup-bot/.env.production
Binary file not shown.
6 changes: 2 additions & 4 deletions internal/standup-bot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ Codebloom Standup Bot is an internal application written in [Rust](https://rust-

### Run

1. Create `.env`
1. Copy everything from `example.env` to `.env`
1. Fill out your `.env` file
1. Simply run `cargo run` to compile & run the binary.
1. Put the Azure-generated `.env` in this directory.
1. Run `cargo run` to compile and run the binary.

`DISCORD_ROLE_ID` is required and must be an unsigned 64-bit integer. It selects
the role mentioned in standup messages and the members eligible for end-of-day
Expand Down
14 changes: 0 additions & 14 deletions internal/standup-bot/example.env

This file was deleted.

Loading
Loading