Skip to content

Add a blog: Introduction to EventWatcher #5787

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

Merged
merged 7 commits into from
May 9, 2025
Merged

Add a blog: Introduction to EventWatcher #5787

merged 7 commits into from
May 9, 2025

Conversation

t-kikuc
Copy link
Member

@t-kikuc t-kikuc commented Apr 28, 2025

What this PR does:

as title.

translated from my own japanese article: https://zenn.dev/cadp/articles/pipecd-eventwatcher-intro

Why we need it:

EventWatcher is an essential feature, but it's so hard to understand for beginners.

Which issue(s) this PR fixes:

Does this PR introduce a user-facing change?:

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

t-kikuc added 3 commits April 28, 2025 20:39
Signed-off-by: t-kikuc <[email protected]>
Signed-off-by: t-kikuc <[email protected]>
@t-kikuc t-kikuc enabled auto-merge (squash) April 28, 2025 11:43
Copy link

codecov bot commented Apr 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.21%. Comparing base (b9293a3) to head (a0fdd04).
Report is 16 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5787      +/-   ##
==========================================
+ Coverage   27.17%   27.21%   +0.03%     
==========================================
  Files         507      506       -1     
  Lines       53423    53563     +140     
==========================================
+ Hits        14520    14577      +57     
- Misses      37796    37871      +75     
- Partials     1107     1115       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 25 to 27
Deployment typically requires manifest changes, and PipeCD doesn't directly trigger deployments from CI pushes.

So, how can we "**deploy using a new image (etc.) after CI completion**"? It's annoying to manually update the manifest repo each time.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Deployment typically requires manifest changes, and PipeCD doesn't directly trigger deployments from CI pushes.
So, how can we "**deploy using a new image (etc.) after CI completion**"? It's annoying to manually update the manifest repo each time.
Deployment typically requires manifest changes. So, how can we "**deploy using a new image (etc.) after CI completion**"? It's annoying to update the manifest repo manually each time.

nits

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i fixed 602e41e

- 1-3. Develop new app code and store the results (container images, etc.) in a container registry
- **4.** Publish an event in CI to pass the new image URI to PipeCD
- **5.** Piped detects the event
- **6.** Update the manifest repo by replacing the image URI
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- **6.** Update the manifest repo by replacing the image URI
- **6.** Update the manifest repo using the data provided that belongs to the event (image URI for example)

nits

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i fixed

602e41e

Signed-off-by: t-kikuc <[email protected]>
--data=ghcr.io/xxx/helloworld:v0.2.0
```

For GitHub Actions, using PipeCD's official `actions-event-register` is recommended (configurations are the same):
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For GitHub Actions, using PipeCD's official `actions-event-register` is recommended (configurations are the same):
If you're using GitHub Actions as your CI, using PipeCD's official `actions-event-register` is recommended (configurations are the same):

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i fixed
a0fdd04

For GitHub Actions, using PipeCD's official `actions-event-register` is recommended (configurations are the same):

https://github.com/marketplace/actions/pipecd-register-event

Copy link
Member

Choose a reason for hiding this comment

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

(Example) Using actions-event-register to trigger an event named helloworld-image-update to change the image URI to ghcr.io/xxx/helloworld:v0.2.0:

      - uses: pipe-cd/[email protected]
        with:
          api-address: ${{ secrets.API_ADDRESS }}
          api-key: ${{ secrets.API_KEY }}
          event-name: helloworld-image-update
          data: ghcr.io/xxx/helloworld:v0.2.0

I think clarify with an example could be better 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks, i fixed
a0fdd04

Signed-off-by: t-kikuc <[email protected]>
Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Member

@Warashi Warashi left a comment

Choose a reason for hiding this comment

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

Thank you!

@t-kikuc t-kikuc merged commit f17dc86 into master May 9, 2025
19 checks passed
@t-kikuc t-kikuc deleted the blog-eventwatcher branch May 9, 2025 00:31
@github-actions github-actions bot mentioned this pull request May 15, 2025
@github-actions github-actions bot mentioned this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants