Remove unnecessary github trigger macro 21/11321/4
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 14 Jun 2018 22:30:00 +0000 (18:30 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 15 Jun 2018 21:16:01 +0000 (17:16 -0400)
This trigger macro was essentially redefining everything the trigger
directly supports. We might as well just call the trigger directly.

Change-Id: I1fc77b501678f213767a70c99119a56a418910fc
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
docs/_static/github-pr-trigger.example [new file with mode: 0644]
docs/best-practices.rst
docs/configuration.rst
docs/jjb/lf-macros.rst
jjb/lf-macros.yaml

diff --git a/docs/_static/github-pr-trigger.example b/docs/_static/github-pr-trigger.example
new file mode 100644 (file)
index 0000000..fbc3250
--- /dev/null
@@ -0,0 +1,12 @@
+- triggers:
+   - github-pull-request:
+       trigger-phrase: ^remerge$
+       only-trigger-phrase: true
+       status-context: JJB Merge
+       permit-all: false
+       github-hooks: true
+       org-list:
+         - '{github-org}'
+       white-list: '{obj:github_pr_whitelist}'
+       admin-list: '{obj:github_pr_admin_list}'
+       included_regions: '{obj:github_included_regions}'
index fa78db5..c298fda 100644 (file)
@@ -143,6 +143,8 @@ complete running via the logs-clear-credentials.sh script. This script contains
 2. Run the build scripts in this case lftools-install.sh and logs-deploy.sh
 3. Remove credentials provided by config-file-provider
 
+.. _preserve-variable-refs:
+
 Preserving Objects in Variable References
 =========================================
 
@@ -160,18 +162,10 @@ Example:
 
 .. code-block:: yaml
 
-    - triggers:
-       - lf-infra-github-pr-trigger:
-           trigger-phrase: ^remerge$
-           status-context: JJB Merge
-           permit-all: false
-           github-hooks: true
-           github-org: '{github-org}'
-           github_pr_whitelist: '{obj:github_pr_whitelist}'
-           github_pr_admin_list: '{obj:github_pr_admin_list}'
-
-In the above example note the use of underscores in `github_pr_admin_list` and
-`github_pr_admin_list`.
+   .. literalinclude:: _static/github-pr-trigger.example
+
+In the above example note the use of underscores in ``github_pr_whitelist``,
+``github_pr_admin_list``, and ``github_included_regions``.
 
 Using single quotes around variables
 ====================================
index 66b4f41..221217d 100644 (file)
@@ -34,7 +34,7 @@ values used by global-jjb templates.
 **GitHub required parameters**:
 
 :git-url: Set this to the base URL of your GitHub repo. In
-    general this should be <https://github.com>. If you are using
+    general this should be https://github.com. If you are using
     GitHub Enterprise, or some other GitHub-style system, then it
     should be whatever your installation base URL is.
 
@@ -46,14 +46,13 @@ values used by global-jjb templates.
     into the scm config.
 
 :github_pr_org: The name of the GitHub organization. All members
-    of this organization will be able to trigger any job using the
-    `lf-infra-github-pr` macro.
+    of this organization will be able to trigger jobs.
 
 :github_pr_whitelist: List of GitHub members you wish to be able to
-    trigger any job that uses the `lf-infra-github-pr-trigger` macro.
+    trigger jobs.
 
 :github_pr_admin_list: List of GitHub members that will have admin
-    privileges on any job using the `lf-infra-github-pr-trigger` macro.
+    privileges on the jobs.
 
 Example Gerrit Infra:
 
index 35727e5..08722cf 100644 (file)
@@ -241,14 +241,6 @@ On the `branch` variable you can assign `$sha1` or `$ghprbActualCommit`
 as the value.  This will require that the job be triggered via
 the GHPRB plugin and not manually.
 
-Triggers
-========
-
-lf-infra-github-pr-trigger
---------------------------
-
-Provides configuration for a GitHub PR Trigger.
-
 Wrappers
 ========
 
index e908282..6a0cab9 100644 (file)
             recursive: '{submodule-recursive}'
           choosing-strategy: '{choosing-strategy}'
 
-############
-# TRIGGERS #
-############
-
-- trigger:
-    name: lf-infra-github-pr-trigger
-    triggers:
-      - github-pull-request:
-          trigger-phrase: '{trigger-phrase}'
-          only-trigger-phrase: '{only-trigger-phrase}'
-          status-context: '{status-context}'
-          permit-all: '{permit-all}'
-          github-hooks: '{github-hooks}'
-          auto-close-on-fail: false
-          org-list:
-            - '{github-org}'
-          white-list: '{obj:github_pr_whitelist}'
-          admin-list: '{obj:github_pr_admin_list}'
-
 ############
 # WRAPPERS #
 ############