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 afa9bbb commit c93d619
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Deploy your application from a CI/CD pipeline via `cURL` + JWT auth.

```
$ curl -s -H "Authorization: bearer abc..." https://example.com/your/rollout/path
$ curl -s -d '{"git-branch": "main"}' -H "Authorization: bearer abc..." https://example.com/your/rollout/path
Rollout complete
```

Expand All @@ -13,7 +13,7 @@ Instead of managing SSH keys in your CI/CD for accounts that have privileged acc

Requires creating a JWT from your CI provider, and sending that token to this service running in your deployment environment to trigger a deployment script.

Also requires a `rollout.sh` script that can handle all the command needing ran to rollout your software.
Also requires a `rollout.sh` script that can handle all the commands needing ran to rollout your software.

## Install

Expand All @@ -29,7 +29,7 @@ $ docker run \

## OIDC Provider examples

This service requires two envionrment variables.
This service requires two environment variables.

- `JWKS_URI` - the URL of the OIDC Provider's [JSON Web Key (JWK) set document](https://www.rfc-editor.org/info/rfc7517). This is used to ensure the JWT was signed by the provider.
- `JWT_AUD` - the audience set in the JWT token.
Expand All @@ -40,6 +40,28 @@ This service requires two envionrment variables.
- `ROLLOUT_CMD` (default: `/bin/bash`) - the command to execute a rollout
- `ROLLOUT_ARGS` (default: `/rollout.sh` ) - the args to pass to `ROLLOUT_CMD`

## Dynamic environment variables for ROLLOUT_CMD

There are a few environment variables you can make available to your rollout command.

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:

```
$ curl -s -d '{"git-branch": "main"}' -H "Authorization: bearer abc..." 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`

### GitHub

```
Expand Down

0 comments on commit c93d619

Please sign in to comment.