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
52
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
1k
TypeScript Custom GitHub Action Development Tips
peaceiris
5
1.4k
Monorepo for Cloudflare Workers
peaceiris
0
960
はてなインターン2020成果発表 peaceiris
peaceiris
0
1.3k
Other Decks in Programming
See All in Programming
MCP調べてみました! / Exploring MCP
uhzz
2
2.2k
AI Agents with JavaScript
slobodan
0
210
PHPバージョンアップから始めるOSSコントリビュート / how2oss-contribute
dmnlk
1
970
Java 24まとめ / Java 24 summary
kishida
3
450
海外のアプリで見かけたかっこいいTransitionを真似てみる
shogotakasaki
1
160
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
1
220
AHC 044 混合整数計画ソルバー解法
kiri8128
0
320
PHP で学ぶ OAuth 入門
azuki
1
120
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
870
PHPで書いたAPIをGoに書き換えてみた 〜パフォーマンス改善の可能性を探る実験レポート〜
koguuum
0
130
custom_lintで始めるチームルール管理
akaboshinit
0
200
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
160
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Bash Introduction
62gerente
611
210k
Music & Morning Musume
bryan
47
6.5k
Raft: Consensus for Rubyists
vanstee
137
6.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
What's in a price? How to price your products and services
michaelherold
245
12k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Docker and Python
trallard
44
3.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.7k
RailsConf 2023
tenderlove
30
1.1k
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 健康にはお気を付けて(自戒)