You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
ISSUE TYPE
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.
The text was updated successfully, but these errors were encountered: