gramex.secrets
¶
commandline()
¶
Run secrets
on the command line to save specific environment variables in a file.
Used in CI tools (e.g. Gitlab/Travis) to save env variables into .secrets.yaml
. For example,
to export $HOME
and all variables starting with $HOME
to .secrets.yaml
, run:
secrets HOME > .secrets.yaml # export HOME=... to .secrets.yaml
secrets HOME=/tmp > .secrets.yaml # export $HOME. If $HOME is not defined, use /tmp
secrets HOME 'GOOGLE*' > .secrets.yaml # export $HOME and all vars starting with $GOOGLE
Source code in gramex\secrets.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|