grim/local-pipelines

bcf5bb4bd83f
Parents e700bdbea6a4
Children 5e0c128f6567
pipeline: add new property private_env

This is currently unused but will return all the env vars that were
passed in as VAR (as opposed to ones that were VAR=FOO).
--- a/pipelines/pipeline.py Wed Jul 27 17:05:22 2016 -0700
+++ b/pipelines/pipeline.py Wed Jul 27 17:06:25 2016 -0700
@@ -50,6 +50,12 @@
# dict of env vars that are not none
return {k: v for k, v in self._env.iteritems() if v is not None}
+ @property
+ def private_env(self):
+ # dict of env vars that are none (grabbed from os.environ)
+ return {k: os.environ.get(k, "") for k, v in self._env.iteritems()
+ if v is None}
+
def _determine_image(self, step):
return step.image or self.config.get("image")