Commit Graph

6 Commits

Author SHA1 Message Date
Pierre Riteau df9ae70899 Support reading Kayobe environment name from file
If using separate branches for each environment, it can be useful to
read the environment name from a file committed to each branch. Or, if
sharing the same branch for all environments, it can be useful to set
the default environment to one with lower impact, e.g. dev or staging.

If no --environment option is specified and a .environment file exists
at the root of the directory, use its content as KAYOBE_ENVIRONMENT.

Change-Id: I22b2b466e47a3b4d96931d754a4de7544f0ada5d
(cherry picked from commit 2af2c3a3b5387c577801b165ecd749fe782fddb9)
2021-08-10 09:56:10 +01:00
Pierre Riteau f1d98a9394 Support specifying a Kayobe environment to use
This also includes a cherry-pick of
I9a44578196086ec24de80b992fed385826778feb, Stop accessing unbound
variables.

The kayobe-env script would try accessing $1 which is an unbound
variable if no argument is passed. This fails when `set -u` is set.

Also refactor usage output into a function. As a side effect, a missing
argument to --environment now causes the script to properly exit with an
error.

Change-Id: I604c2ae6c47ef16fdc98e0598cad820e49e2ff26
Story: 2002009
Task: 41577
(cherry picked from commit 75b6402f8b0d4e39c40a1d11091ca760d8b99dee)
2021-08-10 09:56:10 +01:00
Mark Goddard f129b07372 Add development environment configuration, imported from kayobe 2017-10-27 17:47:13 +01:00
Mark Goddard dd942ed498 Update kayobe-env for new recommended directory structure 2017-09-20 17:31:55 +01:00
Mark Goddard c54c50398d Add Apache2 license 2017-04-19 15:55:40 +01:00
Mark Goddard b95a01d75d Add a script to set kayobe environment variables 2017-04-19 15:53:31 +01:00