Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 18, 2024
1 parent c93d619 commit 8cbc7b2
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ $ docker run \
rollout:latest
```

You should then proxy that port with some service that can handle TLS for you.

## OIDC Provider examples

This service requires two environment variables.
Expand All @@ -46,21 +48,28 @@ There are a few environment variables you can make available to your rollout com

These environment variables can be passed to the cURL command when rolling out your changes.

For example, if you want your rollout script to have the git branch that is being deployed you can pass that in the rollout like so:
For example, if you want your rollout script to have the git repo and branch that is being deployed you can pass that in the rollout cURL call as seen below. Doing so will make an environment variable `$GIT_REPO` and `$GIT_BRANCH` available in your rollout script.

```
$ curl -s -d '{"git-branch": "main"}' -H "Authorization: bearer abc..." https://example.com/your/rollout/path
$ curl -s \
-H "Authorization: bearer abc..." \
-d '{"git-repo": "[email protected]:lehigh-university-libraries/rollout.git", "git-branch": "main"}' \
https://example.com/your/rollout/path
```

These are the environment variables currently supported, keyed by their respective JSON key name:

- `docker-image` **:** `DOCKER_IMAGE`
- `docker-tag` **:** `DOCKER_TAG`
- `git-repo` **:** `GIT_REPO`
- `git-branch` **:** `GIT_BRANCH`
- `rollout-arg1` **:** `ROLLOUT_ARG1`
- `rollout-arg2` **:** `ROLLOUT_ARG2`
- `rollout-arg3` **:** `ROLLOUT_ARG3`
| JSON Key | Env Var Name | Example JSON to send |
|----------------|---------------| -------------------------------------
| `docker-image` | `DOCKER_IMAGE`| `{"docker-image": "foo/bar:latest"}` |
| `docker-tag` | `DOCKER_TAG` | `{"docker-tag": "latest"}` |
| `git-repo` | `GIT_REPO` | `{"repo": "foo/bar:latest"}` |
| `git-branch` | `GIT_BRANCH` | `{"git-branch": "main"}` |
| `rollout-arg1` | `ROLLOUT_ARG1`| `{"rollout-arg1": "FOO"}` |
| `rollout-arg2` | `ROLLOUT_ARG2`| `{"rollout-arg2": "BAR"}` |
| `rollout-arg3` | `ROLLOUT_ARG3`| `{"rollout-arg3": "BAZ"}` |

If there is key/env var name that is generic enough that it warrants its own placeholder, it can be added by submitting an issue or a PR. Otherwise, use the general ARG variables.

### GitHub

Expand Down

0 comments on commit 8cbc7b2

Please sign in to comment.