From 8cbc7b281ee3a511fe4cc8a4531d8eb45177d67d Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Thu, 18 Apr 2024 06:32:48 -0400 Subject: [PATCH] Update README --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d3069af..cd51fdd 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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": "git@github.com: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