Replies: 2 comments 3 replies
-
|
Thanks for the well-structured proposal -- this is a real workflow gap. How it works todayWhen So if you want a trigger to only fire for 3 out of 50 containers, you'd need to add Your proposalExpanding
This is clean and backward-compatible. The implementation touches one method -- // Current:
isTriggerIncluded(containerResult, triggerInclude) {
if (!triggerInclude) return true; // No label = allow
return this.isTriggerIncludedOrExcluded(containerResult, triggerInclude);
}
// With OnInclude:
isTriggerIncluded(containerResult, triggerInclude) {
if (!triggerInclude) {
return this.configuration.auto !== 'oninclude'; // <-- only change
}
return this.isTriggerIncludedOrExcluded(containerResult, triggerInclude);
}Plus updating the Joi schema for Thoughts
If you'd like to open a PR for this, go for it -- happy to review. The key files are:
Let me know if you have questions about the codebase or want to discuss the approach further. |
Beta Was this translation helpful? Give feedback.
-
|
I see it's already implemented in 1.5 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Use Case:
I would like to define a trigger which should only be executed automatically for specific containers.
As far as I know, the only way to do this currently is: Define a trigger with auto=true and exclude it in all container via label except on the containers which should use the trigger. This is very impractical, therefor I have following proposal for the feature:
Proposal:
The trigger configuration
DD_TRIGGER_{trigger_type}_{trigger_name}_AUTOhas 3 supported Values: "All, OnInclude, None" For backwards compatibility the old values still can be used and are mapped to the new values: "true" == "All" and "false" == "None"I'm interested in your opinion about the feature and the proposal before I start implementing it :)
Beta Was this translation helpful? Give feedback.
All reactions