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

Question: Multiple triggers, listeners #199

Closed
adjavaherian opened this issue Oct 31, 2019 · 2 comments
Closed

Question: Multiple triggers, listeners #199

adjavaherian opened this issue Oct 31, 2019 · 2 comments

Comments

@adjavaherian
Copy link

So, Without any sort of conditionals in the trigger templates, what is the current recommendation for assigning different pipelines to different event types?

For example, on PRs, I want to have a full build => deploy pipeline for a preview environment.
But for a commit to a dev branch, I simply want to build an artifact (to be deployed in a separate process).

Do you all do this with multiple triggers now? This seems to be overkill, considering that each trigger requires an ingress and listener and hook too. Any suggestions?

@ncskier
Copy link
Member

ncskier commented Oct 31, 2019

The current way to get around this is to have your interceptor decide whether or not to run the trigger. For your example, you would pass an argument for the branch into the interceptor's header; more info in docs here, and an example interceptor here.

Also, please check out issue #49 about adding filtering to the triggers. The issues discusses how to make these common filtering operations becomes easier to configure. Do you think this issue addresses your concerns?

@dibyom
Copy link
Member

dibyom commented Nov 26, 2019

Filters should be in the upcoming 0.2 release. Until then, the workaround would be to use a interceptor as @ncskier mentioned.

@dibyom dibyom closed this as completed Nov 26, 2019
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

3 participants