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
12
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
920
はてなインターン2020成果発表 peaceiris
peaceiris
0
1.2k
Other Decks in Programming
See All in Programming
GoとPHPのインターフェイスの違い
shimabox
2
210
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.2k
ナレッジイネイブリングにAIを活用してみる ゆるSRE勉強会 #9
nealle
0
170
SwiftUI Viewの責務分離
elmetal
PRO
2
280
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.1k
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.5k
PRレビューのお供にDanger
stoticdev
1
240
Lambdaの監視、できてますか?Datadogを用いてLambdaを見守ろう
nealle
2
720
AIレビュー導入によるCIツールとの共存と最適化
kamo26sima
1
210
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
4 Signs Your Business is Dying
shpigford
183
22k
Rails Girls Zürich Keynote
gr2m
94
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
115
51k
Adopting Sorbet at Scale
ufuk
75
9.2k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
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 健康にはお気を付けて(自戒)