Add per-job URL patterns.

Add the option to specify the URL pattern left in Gerrit, per-job.

Example: a job that builds documentation and uploads it to a staging
site can leave the URL of the staging site iff the job succeeds.

Change-Id: I34841e61e9116fd8d4de7ac09d8f9cfe36fe78ec
Reviewed-on: https://review.openstack.org/18264
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst
index 416174d..961c964 100644
--- a/doc/source/zuul.rst
+++ b/doc/source/zuul.rst
@@ -18,6 +18,8 @@
 Examples of each of the three files can be found in the etc/ directory
 of the source distribution.
 
+.. _zuulconf:
+
 zuul.conf
 ~~~~~~~~~
 
@@ -377,6 +379,18 @@
 **success-message (optional)**
   The message that should be reported to Gerrit if the job fails.
 
+**failure-pattern (optional)**
+  The URL that should be reported to Gerrit if the job fails.
+  Defaults to the Jenkins build URL or the url_pattern configured in
+  zuul.conf.  May be supplied as a string pattern with substitutions
+  as described in url_pattern in :ref:`zuulconf`.
+
+**success-pattern (optional)**
+  The URL that should be reported to Gerrit if the job succeeds.
+  Defaults to the Jenkins build URL or the url_pattern configured in
+  zuul.conf.  May be supplied as a string pattern with substitutions
+  as described in url_pattern in :ref:`zuulconf`.
+
 **hold-following-changes (optional)**
   This is a boolean that indicates that changes that follow this
   change in a dependent change pipeline should wait until this job