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

Add ability to disable trigger on changes for S3/CC/GH source providers #357

Merged

Conversation

sbkok
Copy link
Collaborator

@sbkok sbkok commented Apr 21, 2021

Why?

For several use cases, it would be great to have a pipeline that would not trigger on source updates.
For example, a pipeline might only need to be triggered on a schedule, by the completion of another pipeline, or manually.

This was requested by the following issues:

What?

The CodeCommit, Github, and S3 source providers have been update to support disabling triggering on source changes.

As described in the docs/providers-guide.md documentation, you can optionally disable it when required.

This code also solves a bug when a pipeline would rely on polling of changes for CodeCommit. In the previous version, it would be triggering twice instead of once when the source account id was specified. As the event handler would be listening for events that indicate an update was performed, even when the pipeline was set to use polling for changes instead of events.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

**Why?**

For several use cases, it would be great to have a pipeline that
would not trigger on source updates.
For example, a pipeline might only need to be triggered on a
schedule, by the completion of another pipeline, or manually.

This was requested by the following issues:
* Issue awslabs#308 - Starting pipeline only on completion_trigger
* Issue awslabs#337 - Question: Disable webhook for Github provider

**What?**

The CodeCommit, Github, and S3 source providers have been update
to support disabling triggering on source changes.

As described in the `docs/providers-guide.md` documentation, you
can optionally disable it when required.

This code also solves a bug when a pipeline would rely on polling
of changes for CodeCommit. In the previous version, it would be
triggering twice instead of once when the source account id was
specified. As the event handler would be listening for events
that indicate an update was performed, even when the pipeline
was set to use polling for changes instead of events.
@sbkok sbkok added the enhancement New feature or request label Apr 21, 2021
Copy link
Collaborator

@thomasmcgannon thomasmcgannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this feature!

Copy link

@deltagarrett deltagarrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great stuff!

@sbkok sbkok merged commit f9ffc7c into awslabs:master Apr 22, 2021
@sbkok sbkok deleted the feature/disable-trigger-on-source-update branch April 22, 2021 13:13
@sbkok sbkok linked an issue Nov 8, 2021 that may be closed by this pull request
@sbkok sbkok added this to the v3.2.0 milestone Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Disable webhook for Github provider
3 participants