Merge branch 'stable-3.2'

* stable-3.2:
  Add custom stamp to add its-base revision to version number
  Shorten command to run tests
  Update documentation of where Bazel puts the jar
  Give an example of an API token in Documentation
  Drop `username` requirement from documentation
  Drop failing tests
  Drop documentation for `remove-project`

Change-Id: I48522c8ba98c5ada76b442d4c97dcb10c57c597a
diff --git a/tools/workspace_status_release.py b/tools/workspace_status_release.py
new file mode 100644
index 0000000..fea9351
--- /dev/null
+++ b/tools/workspace_status_release.py
@@ -0,0 +1,30 @@
+import os
+import sys
+
+# As this plugin is typically only sym-linked into a gerrit checkout and both os.getcwd and
+# os.path.abspath follow symbolic links, they would not allow us to find the gerrit root
+# directory. So we have to resort to the PWD environment variable to find the place we're
+# symlinked to.
+#
+# We append __file__ to avoid having to require to run it from a well-know directory.
+ABS_FILE_PARTS = os.path.join(os.getenv('PWD'), __file__).split(os.sep)
+PLUGIN_NAME = ABS_FILE_PARTS[-3]
+GERRIT_ROOT = os.sep.join(ABS_FILE_PARTS[:-4])
+
+sys.path = [os.sep.join([GERRIT_ROOT, 'tools'])] + sys.path
+from workspace_status_release import revision
+
+def get_plugin_revision(name):
+    os.chdir(os.path.join(GERRIT_ROOT, 'plugins', name))
+    ret=revision(GERRIT_VERSION)
+    return ret
+
+os.chdir(GERRIT_ROOT)
+GERRIT_VERSION=revision()
+
+ITS_BASE_VERSION=get_plugin_revision('its-base')
+PLUGIN_RAW_VERSION=get_plugin_revision(PLUGIN_NAME)
+
+PLUGIN_FULL_VERSION="%s(its-base:%s)" % (PLUGIN_RAW_VERSION, ITS_BASE_VERSION)
+
+print("STABLE_BUILD_%s_LABEL %s" % (PLUGIN_NAME.upper(), PLUGIN_FULL_VERSION))