From: Thanh Ha Date: Thu, 14 Jun 2018 22:30:00 +0000 (-0400) Subject: Remove unnecessary github trigger macro X-Git-Tag: v0.21.0~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F21%2F11321%2F4;p=releng%2Fglobal-jjb.git Remove unnecessary github trigger macro 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 --- diff --git a/docs/_static/github-pr-trigger.example b/docs/_static/github-pr-trigger.example new file mode 100644 index 00000000..fbc32509 --- /dev/null +++ b/docs/_static/github-pr-trigger.example @@ -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}' diff --git a/docs/best-practices.rst b/docs/best-practices.rst index fa78db52..c298fda6 100644 --- a/docs/best-practices.rst +++ b/docs/best-practices.rst @@ -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 ==================================== diff --git a/docs/configuration.rst b/docs/configuration.rst index 66b4f41c..221217d1 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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 . 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: diff --git a/docs/jjb/lf-macros.rst b/docs/jjb/lf-macros.rst index 35727e50..08722cf7 100644 --- a/docs/jjb/lf-macros.rst +++ b/docs/jjb/lf-macros.rst @@ -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 ======== diff --git a/jjb/lf-macros.yaml b/jjb/lf-macros.yaml index e908282c..6a0cab9d 100644 --- a/jjb/lf-macros.yaml +++ b/jjb/lf-macros.yaml @@ -477,25 +477,6 @@ 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 # ############