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
Transcript
10 slides
すべてのリポジトリを管理する魔法 @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 あれ、これも負債では?
More Decks by Shoppingjaws
See All by Shoppingjaws
Intent as Code LT版
shoppingjaws
0
54
Intent as Code
shoppingjaws
6
1.3k
YouはどうしてSREに?
shoppingjaws
0
1.1k
(品質を監視する)SLOと向き合うための武器
shoppingjaws
0
76
リモートで新入社員がゴキゲンに働く方法教えます
shoppingjaws
0
110
Other Decks in Technology
See All in Technology
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
130
こんなに変わった! AWSネットワークの常識
shotashiratori
16
10k
「個社」ではなく「業界」の課題を解く AI 対話開発 ー 価値を広げる設計と、価値を守るエンジニアリング ー
ivry_presentationmaterials
3
670
メール到達性を支える、リンク先URLのドメイン評価の扱い方
wind111
0
160
Community Over Code Glasgow 2026 + Lakehouse Day recap
lycorptech_jp
PRO
1
130
SORACOM × AWS IoT Core でSREする
butadora
0
110
LLM 基盤と kagent v0 を全部 k8s に入れてみた / Deploy both LLM and kagent v0 in k8s
kota2and3kan
0
240
共通基盤の実装に Kotlin - Quarkus を選定した理由と採用したアーキテクチャ
nealle
1
130
飯から始まるデータエンジニア
sansantech
PRO
0
100
AWS Emulator を評価する: 手元で動く AWS の API の仕組み、始め方、確かめ方
inariku
PRO
2
760
属人化したISMS運用をGitHubとAIで仕組み化した1年間の記録
sioncojp
4
2.8k
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
440
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
640
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Product Roadmaps are Hard
iamctodd
55
13k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
580
Believing is Seeing
oripsolob
1
280
The Invisible Side of Design
smashingmag
301
52k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300