WIP add MOZREVIEW_DEV env variable; r!smacleod
Adds a MOZREVIEW_DEV environmental variable, allowing different behaviour
during MozReview development.
MozReview-Commit-ID: FqwzJiv3l4H
--- a/ansible/roles/docker-rbweb/tasks/main.yml
+++ b/ansible/roles/docker-rbweb/tasks/main.yml
@@ -18,16 +18,18 @@
- name: Install Djblets and Review Board
command: /venv/bin/python setup.py install
chdir=/version-control-tools/reviewboard-fork/{{ item }}
with_items:
- djblets
- reviewboard
tags:
- docker-reviewboard-refresh
+ environment:
+ MOZREVIEW_DEV: 1
- name: Install python libraries
command: /venv/bin/python setup.py install chdir=/version-control-tools/pylib/{{ item }}
with_items:
- mozautomation
- name: Build mozreview extension
command: /venv/bin/python setup.py bdist_egg chdir=/version-control-tools/pylib/mozreview
--- a/testing/vcttesting/mozreview.py
+++ b/testing/vcttesting/mozreview.py
@@ -49,16 +49,19 @@ logger = logging.getLogger(__name__)
WATCHMAN = None
for path in os.environ['PATH'].split(':'):
c = os.path.join(path, 'watchman')
if os.path.exists(c):
WATCHMAN = c
break
+# Allow reviewboard-fork to easily detect when running within the dev env.
+os.putenv('MOZREVIEW_DEV', '1')
+
class MozReview(object):
"""Interface to MozService service.
This class can be used to create and control MozReview instances.
"""
def __init__(self, path, web_image=None, hgrb_image=None,