From aaa483546928fd64aabef85f45cd90b22c7700b5 Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Sat, 14 Jan 2023 20:47:39 -0800 Subject: [PATCH] Add documentation of configuration overrides --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 05e21ae..f9d03c6 100644 --- a/README.md +++ b/README.md @@ -110,3 +110,16 @@ pipeline: ``` See the detail of [issue comment](https://github.com/appleboy/drone-ssh/issues/51#issuecomment-336732928). + +## Configuration + +See [DOCS.md](./DOCS.md) for examples and full configuration options + +Configuration options are loaded from multiple sources: + +0. Hardcoded drone-ssh defaults. See [main.go CLI Flags](https://github.com/albertyw/drone-ssh/blob/master/main.go#L39) for more information. +1. From a `.env` [dotenv](https://github.com/joho/godotenv) file at the root of the repository tested by drone. +2. From a dotenv file at a path specified by the `PLUGIN_ENV_FILE` environment variable. +3. From your `.drone.yml` Drone configuration. + +Later sources override previous sources, i.e. if `PORT` is set in an `.env` file committed in the repository or created by previous test steps, it will override the default set `main.go`.