Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TriggerGroups for CI Jobs 🥳 #956

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

afrittoli
Copy link
Member

@afrittoli afrittoli commented Dec 9, 2021

Changes

TriggerGroups are a new alpha feature in Triggers that allow define
a set of interceptors that will be processed before Trigger resources
for a filtered group of Triggers.

All triggers in CI jobs deal with GitHub event so they share a large
surface of the interceptors. Using TriggerGroups makes it easier to
maintain the triggers for all projects.

The change is not only cosmetic though: interceptors like github,
cel, add-pr-body will be processed only once. The hash in the GitHub
event is going to be validated once. The PR definition will be pulled
from the GitHub API once (per trigger group) instead of once per
trigger.

This paves the way for further changes:

  • add the add-team-member custom interceptor and logic so we only
    run tests for authorised users
  • add a trigger group to add comments that enahnce the user experience

Signed-off-by: Andrea Frittoli andrea.frittoli@uk.ibm.com

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide
for more details.

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 9, 2021
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 9, 2021
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 9, 2021
@afrittoli
Copy link
Member Author

/cc @jmcshane @tektoncd/triggers-maintainers @vdemeester

@tekton-robot
Copy link
Contributor

@afrittoli: GitHub didn't allow me to request PR reviews from the following users: jmcshane.

Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @jmcshane @tektoncd/triggers-maintainers @vdemeester

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nikhil-thomas
Copy link
Member

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nikhil-thomas

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 9, 2021
TriggerGroups are a new alpha feature in Triggers that allow define
a set of interceptors that will be processed before Trigger resources
for a filtered group of Triggers.

All triggers in CI jobs deal with GitHub event so they share a large
surface of the interceptors. Using TriggerGroups makes it easier to
maintain the triggers for all projects.

The change is not only cosmetic though: interceptors like github,
cel, add-pr-body will be processed only once. The hash in the GitHub
event is going to be validated once. The PR definition will be pulled
from the GitHub API once (per trigger group) instead of once per
trigger.

This paves the way for further changes:
- add the add-team-member custom interceptor and logic so we only
  run tests for authorised users
- add a trigger group to add comments that enahnce the user experience

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
@vdemeester
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 14, 2021
@tekton-robot tekton-robot merged commit 3cedf9c into tektoncd:main Dec 14, 2021
afrittoli added a commit to afrittoli/plumbing that referenced this pull request Dec 14, 2021
All trigger resources are still v1alpha1.
Migrating the CI event listener for now since it's required by
for trigger groups: tektoncd#956

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
tekton-robot pushed a commit that referenced this pull request Dec 14, 2021
All trigger resources are still v1alpha1.
Migrating the CI event listener for now since it's required by
for trigger groups: #956

Signed-off-by: Andrea Frittoli <andrea.frittoli@uk.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants