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
55
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.5k
Monorepo for Cloudflare Workers
peaceiris
0
1k
はてなインターン2020成果発表 peaceiris
peaceiris
0
1.3k
Other Decks in Programming
See All in Programming
Efficiency and Rock 'n’ Roll (Really!)
hollycummins
0
590
インターフェース設計のコツとツボ
togishima
2
480
漸進。
ssssota
0
1k
ワンバイナリWebサービスのススメ
mackee
10
7.4k
Blueskyのプラグインを作ってみた
hakkadaikon
1
270
少数精鋭エンジニアがフルスタック力を磨く理由 -そしてAI時代へ-
rebase_engineering
0
130
try-catchを使わないエラーハンドリング!? PHPでResult型の考え方を取り入れてみよう
kajitack
3
220
Babylon.js 8.0のアプデ情報を 軽率にキャッチアップ / catch-up-babylonjs-8
drumath2237
0
110
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
770
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
160
TypeScript エンジニアが Android 開発の世界に飛び込んだ話
yuisakamoto
6
940
What Spring Developers Should Know About Jakarta EE
ivargrimstad
1
580
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Code Review Best Practice
trishagee
68
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.2k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
25
2.8k
BBQ
matthewcrist
88
9.7k
Embracing the Ebb and Flow
colly
85
4.7k
Optimizing for Happiness
mojombo
378
70k
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 健康にはお気を付けて(自戒)