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
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
E2E Test というハーネス — AI時代の自動テスト民主化
daishukojima
10
5.7k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
17
120k
あの日、見つかっていなかったらどうなっていたか
kazzpapa3
2
260
20261113_JAWS_Osaka
takuyay0ne
1
580
Agent Routerで作るマルチテナント 推論基盤 #CNDW2026 / Building Multi-Tenant Inference Platform with Agent Router #CNDW2026
everpeace
3
330
アラートを見直していたら営業組織への理解にちょっとだけ繋がった話
z63d
1
210
市販IoT機器や自作IoT機器とHomeAssistantを駆使して家の電気代をできる限り見える化する方法の考案
harutiro
0
390
Kansai WordPress Meetup@大阪『ブロックテーマを作る上で知っておくべきこと
torounit
0
250
文書画像からの情報抽出を行うエージェントを、軌跡の正解データ無しで作れるか
sansantech
PRO
2
210
個人ASを取得して、自宅Kubernetes上のVMをグローバルIPで公開した話
munenick
0
210
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
1
540
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.8k
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
390
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
560
The agentic SEO stack - context over prompts
schlessera
0
1k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
840
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
300
Skip the Path - Find Your Career Trail
mkilby
1
290
How STYLIGHT went responsive
nonsquared
100
6.4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
540
Bash Introduction
62gerente
615
220k
Balancing Empowerment & Direction
lara
6
1.4k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k