Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PipeCD LT 会 #2 プラグインアイデア大会!!
Search
Shohei Ueda
March 05, 2025
Programming
0
53
PipeCD LT 会 #2 プラグインアイデア大会!!
PipeCD LT 会 #2 プラグインアイデア大会!!
- ABEMA における SCRIPT_RUN x Event contexts 活用事例
- 作ってみたい PipeCD Plugin
Shohei Ueda
March 05, 2025
Tweet
Share
More Decks by Shohei Ueda
See All by Shohei Ueda
ABEMA 画像配信基盤における Cloudflare Workers の活用
peaceiris
9
1.1k
TypeScript Custom GitHub Action Development Tips
peaceiris
5
1.4k
Monorepo for Cloudflare Workers
peaceiris
0
970
はてなインターン2020成果発表 peaceiris
peaceiris
0
1.3k
Other Decks in Programming
See All in Programming
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
78
20k
KANNA Android の技術的課題と取り組み
watabee
0
170
flutter_kaigi_mini_4.pdf
nobu74658
0
140
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
1
160
Making TCPSocket.new "Happy"!
coe401_
1
2.9k
Road to RubyKaigi: Making Tinny Chiptunes with Ruby
makicamel
4
530
ComposeでWebアプリを作る技術
tbsten
0
130
2025-04-25 GitHub Copilot Agent ライブデモ(スクリプト)
goataka
0
100
DevOpsDaysTokyo2025社内副業で他部門へ_越境_して見えた価値再定義最大1か月のリードタイムを10分に短縮したDevOps実践.pdf
susumutomita
0
110
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
1
4.7k
Ruby on Railroad: The Power of Visualizing CFG
ydah
0
290
プロフェッショナルとしての成長「問題の深掘り」が導く真のスキルアップ / issue-analysis-and-skill-up
minodriven
8
1.9k
Featured
See All Featured
Optimizing for Happiness
mojombo
378
70k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
Being A Developer After 40
akosma
91
590k
For a Future-Friendly Web
brad_frost
177
9.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Facilitating Awesome Meetings
lara
54
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
A Tale of Four Properties
chriscoyier
158
23k
Transcript
AbemaTV, Inc. All Rights Reserved AbemaTV, Inc. All Rights Reserved
1 PipeCD LT 会 #2 プラグインアイデア大会!! 2025-03-04 株式会社 AbemaTV, Shohei Ueda
AbemaTV, Inc. All Rights Reserved 2 • 自己紹介 • ABEMA
における SCRIPT_RUN x Event contexts 活用事例 • 作ってみたい PipeCD Plugin INDEX
AbemaTV, Inc. All Rights Reserved Shohei Ueda 2022 年度に株式会社サイバーエージェントへ新卒入社し た後、株式会社
AbemaTV へ配属。バックエンドエンジニ アとして ABEMA の開発に従事。 現在は Developer Productivity Engineer として ABEMA における開発生産性に向き合っています。 趣味で各種 OSS を公開しています。 peaceiris.com テニス、フットサル、筋トレ (咳喘息 & 肋骨骨折) 3 Profile
AbemaTV, Inc. All Rights Reserved ABEMA における SCRIPT_RUN x Event
Contexts 活用事例 4
AbemaTV, Inc. All Rights Reserved 5 ABEMA Backend リリースフロー
AbemaTV, Inc. All Rights Reserved 6 • いつ WAIT_APPROVAL stage
に到達したのか分からずタイムアウトさせ てしまう。再度 Sync するトイルでリードタイムが悪化 • 大量の PipeCD Deployment が作成されるが、どれが自分のものか分から ず、間違って人の Deployment のリリースを進めると危険 • Deployment がどの commit, pull-request で発火したのか特定が大変。 特に source repo までたどるのが難しい • 現状の PipeCD はグループメンションのみサポートしており、個別メン ションができない 課題に感じていたこと
AbemaTV, Inc. All Rights Reserved 7 • WAIT_APPROVAL stage に到達したタイミングで担当者に
Slack 通知が届くようになりトイルを削減! • 一つの commit から大量の Deployment が作成されても自分のも のが一目瞭然に! • Deployment がどの commit, pull-request で発火したのか特定 が容易に! • PipeCD で個別メンションを実現! SCRIPT_RUN x Event contexts で解決したこと
AbemaTV, Inc. All Rights Reserved 8 PipeCD Deployment を起動した開発者へ Slack
通知 を送信できるようになった
AbemaTV, Inc. All Rights Reserved 9 PipeCD Deployment を起動した開発者へ Slack
通知 を送信できるようになった
AbemaTV, Inc. All Rights Reserved 10 PipeCD Deployment を起動した開発者へ Slack
通知 を送信できるようになった(Rollback)
AbemaTV, Inc. All Rights Reserved 11 PipeCD Deployment を起動した開発者へ Slack
通知 を送信できるようになった(Rollback)
AbemaTV, Inc. All Rights Reserved 実装の紹介 12 Shell Script 書きました
AbemaTV, Inc. All Rights Reserved 13 pipectl event register -\-contexts
で contexts に指定した key, value が piped の 作成する Git commit body に Git Trailers と して記載される。 merging-actor を仕込んで pull-request を マージ(PipeCD Deployment を起動) した開発者を特定 GitOpsの効率化:commit追跡を簡単にするア イデア集 PipeCD Event contexts a
AbemaTV, Inc. All Rights Reserved 14 Deployment の任意のタイミングでコマンドを実行できるステージ 用途は •
Slack 通知を送信 • curl で E2E test の起動 など様々に利用できます https://pipecd.dev/docs-v0.50.x/user-guide/managing-application/cust omizing-deployment/script-run/ SCRIPT_RUN stage
AbemaTV, Inc. All Rights Reserved 15 CI で contexts の定義
AbemaTV, Inc. All Rights Reserved 16 Slack ID 登録用の Shell
Script を実装 .pipe/script_run/shared/setup_slack.sh
AbemaTV, Inc. All Rights Reserved 17 共通利用の Shell Script を実装
.pipe/script_run/backend/slack.sh
AbemaTV, Inc. All Rights Reserved 18 app.pipecd.yaml に SCRIPT_RUN を定義
AbemaTV, Inc. All Rights Reserved これを PipeCD Plugin にしたい! 19
より便利な SCRIPT_RUN として
AbemaTV, Inc. All Rights Reserved 20 • SCRIPT_RUN stage で共通の
Shell Script を利用する場合に、相対パス で参照するのが辛い! • 現状は Shell Script でなんとかなっているが、さらに高度な実装をした い場合は Go などで書きたい! • 同じ commit から発火した Deployment 群をまとめて一つの Slack メン ションで通知したい! • 同じ commit から発火した Deployment 群の WAIT_APPROVAL を一括 で承認したい! Plugin なら... より高度な SCRIPT_RUN として Plugin に期待!
AbemaTV, Inc. All Rights Reserved Thank you! 21 健康にはお気を付けて(自戒)