Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
すべてのリポジトリを監視する魔法
Search
Shoppingjaws
November 28, 2024
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
すべてのリポジトリを監視する魔法
Shoppingjaws
November 28, 2024
More Decks by Shoppingjaws
See All by Shoppingjaws
Intent as Code LT版
shoppingjaws
0
53
Intent as Code
shoppingjaws
6
1.3k
YouはどうしてSREに?
shoppingjaws
0
1.1k
(品質を監視する)SLOと向き合うための武器
shoppingjaws
0
75
リモートで新入社員がゴキゲンに働く方法教えます
shoppingjaws
0
110
Other Decks in Technology
See All in Technology
AI時代に求められる優秀なTechLeadの振る舞い
pospome
11
16k
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
130
AWS構成から考えるWebセキュリティ ― WordPressの構築経験から考える公開範囲と更新運用【JAWS FESTA 2026 in AKITA】
cscengineer
PRO
2
400
Metadata - Section 3 : Dublin Core Standard · DC
mohab1
0
120
llm-d に入門してみた / Try out llm-d
kota2and3kan
0
110
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
210
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
150
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
230
Sizing, Benchmarking and Performance Tuning Apache Flink Clusters
rmetzger
0
150
DBTS2026 盛り上がってますか!?Databricksが実現するAI時代のデータ基盤
akuwano
1
200
2026 Apache Flink Community Checkpoint
rmetzger
0
220
Bots in Kiro Crew (One point of contact for ongoing work) | Kiro: Zero to Hero 12
inariku
PRO
1
120
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
ラッコキーワード サービス紹介資料
rakko
5
5.8M
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Producing Creativity
orderedlist
PRO
348
41k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
The Language of Interfaces
destraynor
162
27k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Transcript
すべてのリポジトリを管理する魔法 @ShoppingJaws / かいもの 監視
自己紹介 名前:@ShoppingJaws / かいもの 所属:スタディスト 役割:SRE 主食:CI/CD,IaC,DevOps 他 :SRE NEXT運営 好きなツール:1Password,aqua
本名がタガログ語で ”かいもの上手”(意訳)って意味
背景 - どちらかというとPolyレポ環境 - メンテ対象のリポジトリの数は30くらい(多分) - 弊社のリポジトリはIaCで管理されている - wetなmanifestを保つために検証環境を立ち上げると、Botが自動でいろいろなリ ポジトリにPushする
負債 - 脆弱性検知の通知を見逃しがち - ちゃんと設定しないと通知されない - FailureしているActionsに気付けない - リポジトリ間で相互に作用する仕組みがあり、Push先以外でFail する
- 全部にif: failureを導入し、徹底するのがむずい - リポジトリ一つ一つに手作業で設定をし続けるのは大変 - 作業は30秒で終わるけど、x30となると話が違う 漏れなく、特定のイベントだけ監視したい
アイデア - Github Webhookが使えそうだけど - SlackがNestedなJSONを受付ない仕様 - Webhookの通知すべてを知りたい訳じゃない - dependabot_alert
イベントはopen/closeなど事ある毎にWebhookを とばしてくる - リポジトリをIaC管理しているので、宣言的に通知を設定したい - 対象リポジトリに抜け漏れなく導入
何したの LTなのでいろいろ端折って
GitHub Webhook ->Lambda -> Slack Workflow
Lambdaの処理 平滑化 NestedなJSONを1階層しかないJSONへ変換 →SlackWebhookはフラットなJSONしか受け取ってくれない仕様 例)repository.name => repository-name 条件フィルタ クエリパラメータで渡された条件を元にSlackへ転送するか判断 例)dependabot_alertなら、https://<lambdaURL>?alert.state=open
github_repository_webhookに宣言的に通知を記述できるようになった
結論 リポジトリを作る時に宣言するだけで、通知が飛ぶようになった ここにあるイベントであれば通知 できるはず PushイベントだけはLambdaの 同時実行Quotaを念の為確認し ておいた方がよい
EOF あれ、これも負債では?