From 7dddfb270c38bf74190abecf051730ee7e9bd105 Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Fri, 25 Mar 2016 14:46:09 +0000 Subject: [PATCH 1/3] Add cache-keys run to .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f27f049..ac69287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,3 +14,5 @@ script: - cd .. - git clone git://git.baserock.org/baserock/baserock/definitions - cd definitions +- echo 'mode: keys-only' > ybd.conf +- ../ybd/ybd.py ci x86_64 From 24f8daa16d46d01edfab4f1a33b05ce3b54d8158 Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Fri, 25 Mar 2016 15:15:42 +0000 Subject: [PATCH 2/3] Add support for taking ybd config from YBD_* environent variables --- ybd/app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ybd/app.py b/ybd/app.py index f70d498..945e521 100644 --- a/ybd/app.py +++ b/ybd/app.py @@ -150,8 +150,15 @@ def setup(args): # Suppress multiple instances of the same warning. warnings.simplefilter('once', append=True) + # dump any applicable environment variables into a config file + with open('./ybd.environment', 'w') as f: + for key in os.environ: + if key[:4] == "YBD_": + f.write(key[4:] + ": " + os.environ.get(key) + '\n') + # load config files in reverse order of precedence load_configs([ + os.path.join(os.getcwd(), 'ybd.environment'), os.path.join(os.getcwd(), 'ybd.conf'), os.path.join(os.path.dirname(__file__), '..', 'ybd.conf'), os.path.join(os.path.dirname(__file__), 'config', 'ybd.conf')]) From bf8dba5b7a49799d9223526da2640155f440cba5 Mon Sep 17 00:00:00 2001 From: Paul Sherwood Date: Fri, 25 Mar 2016 15:17:11 +0000 Subject: [PATCH 3/3] Export YBD_mode=keys-only for initial travis run --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ac69287..7bb7272 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,5 @@ script: - cd .. - git clone git://git.baserock.org/baserock/baserock/definitions - cd definitions -- echo 'mode: keys-only' > ybd.conf +- export YBD_mode=keys-only - ../ybd/ybd.py ci x86_64