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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
46
Intent as Code
shoppingjaws
6
1.2k
YouはどうしてSREに?
shoppingjaws
0
1.1k
(品質を監視する)SLOと向き合うための武器
shoppingjaws
0
69
リモートで新入社員がゴキゲンに働く方法教えます
shoppingjaws
0
110
Other Decks in Technology
See All in Technology
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
360
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
1
490
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
350
DBについての基礎説明(MySQL編) - コロプラ 2026年度 新卒研修
colopl
0
140
野蛮なアジャイル [サイボウズ発!]組織の常識を覆した反骨のスクラム実践記 / Barbaric Agile - Enterprise Agile Study Group
ama_ch
0
110
⾮構造化データを価値に変える AI エージェント基盤とその組織
ivry_presentationmaterials
0
210
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
200
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
740
AI × アーキテクト 第1・2章|生成AIの課題とアーキテクトの素養
daidaidai
0
190
大型犬好きによるPugの紹介
yamanoku
1
160
WasmをRustにする
sansantech
PRO
0
300
ウォンテッドリーの最近のプロダクトと技術の紹介
stomk
0
220
Featured
See All Featured
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
sira's awesome portfolio website redesign presentation
elsirapls
0
460
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
The Curse of the Amulet
leimatthew05
3
16k
エンジニアに許された特別な時間の終わり
watany
109
250k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Designing for Timeless Needs
cassininazir
1
530
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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 あれ、これも負債では?