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
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
Optimizing JRuby 10
headius
0
480
「影響が少ない」を自分の目でみてみる
o0h
PRO
2
1.2k
趣味全開のAITuber開発
kokushin
0
200
Laravel × Clean Architecture
bumptakayuki
PRO
0
110
PHP で学ぶ OAuth 入門
azuki
1
210
Jakarta EE Meets AI
ivargrimstad
0
250
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
1.1k
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
100
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
550
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6.6k
状態と共に暮らす:ステートフルへの挑戦
ypresto
3
800
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
72
17k
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
670
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
Producing Creativity
orderedlist
PRO
344
40k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
Site-Speed That Sticks
csswizardry
5
500
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
The Invisible Side of Design
smashingmag
299
50k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Building Applications with DynamoDB
mza
94
6.3k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Making Projects Easy
brettharned
116
6.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 健康にはお気を付けて(自戒)