grim/local-pipelines

0d7f3b7ad49f
Parents ac786d7c6352
Children 88d6a545c161
pipeline: set BITBUCKET_ special env vars
--- a/pipelines/pipeline.py Thu Jul 28 01:01:56 2016 -0700
+++ b/pipelines/pipeline.py Thu Jul 28 01:02:10 2016 -0700
@@ -32,6 +32,12 @@
self.repo = repo
self._env = env or {}
+ # add special variables
+ self._env["BITBUCKET_BRANCH"] = self.repo.branch
+ self._env["BITBUCKET_COMMIT"] = self.repo.node
+ self._env["BITBUCKET_REPO_OWNER"] = self.repo.owner
+ self._env["BITBUCKET_REPO_SLUG"] = self.repo.slug
+
@property
def steps(self):
ret = self.config["pipelines"]["default"]