WIP add MOZREVIEW_DEV env variable; r!smacleod draft
authorbyron jones <glob@mozilla.com>
Thu, 25 Aug 2016 23:56:38 +0800
changeset 9460 66ff93c3f2ff3591ab5edf8788e92ebed448cc7b
parent 9456 c1671a7e026a8264080de2adc5a937d2d12be842
child 9461 12db09bdc3d69818e319f6a91bedd1cc88a45544
push id1187
push userbjones@mozilla.com
push dateThu, 01 Sep 2016 13:13:36 +0000
WIP add MOZREVIEW_DEV env variable; r!smacleod Adds a MOZREVIEW_DEV environmental variable, allowing different behaviour during MozReview development. MozReview-Commit-ID: FqwzJiv3l4H
ansible/roles/docker-rbweb/tasks/main.yml
testing/vcttesting/mozreview.py
--- 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,