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

Automation Webhook Filters #8405

Closed
tima opened this issue Oct 15, 2020 · 2 comments
Closed

Automation Webhook Filters #8405

tima opened this issue Oct 15, 2020 · 2 comments

Comments

@tima
Copy link

tima commented Oct 15, 2020

ISSUE TYPE
  • Feature Idea
SUMMARY

Integrated filtering of Automation Webhook events in Job and Workflow Templates

AWX can receive webhook events to launch a Job or Workflow today. While Git service providers such as GitHub have a long list of Webhooks events they can issue some are rather course grain.

Take Pull Requests events in GitHub as is documented. Repos configured to publish these types of events will fire for pull request opened, closed, reopened, edited, assigned, unassigned, review requested, review request removed, labeled, unlabeled, synchronized, ready for review, converted to draft, locked, or unlocked.

This is suboptimal if you just want to run a job when a merge occurs as you would in a GitOps workflow. Without filtering jobs and workflows are run frequently and unnecessarily for every interaction to a pull request.

One work around is to add conditional logic to a play that examines the webhook payload and exit out of the run immediately if it is not a merge. You have to take care in how you write that logic if you want to have the option of manually launch that automation. Despite this added logic, it still doesn't stop things like inventory or project repos syncs from running first and unnecessarily consuming resources.

Hence, this feature request: provide some sort of filtering on webhooks that would be applied before any job or workflows or associated tasks are launched. Ideally there be some "easy" (common) filters, like a PR merge, that are just a simple checkbox in addition to a textbook for a conditional statement for writing an arbitrary filter conditions.

@shanemcd
Copy link
Member

Dupe of #5323

@tima
Copy link
Author

tima commented Oct 15, 2020

BAH! I even searched and it came up empty. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants