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
mako_makok
February 24, 2021
Programming
670
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
退屈なことはバッチにやらせよう
mako_makok
February 24, 2021
More Decks by mako_makok
See All by mako_makok
Kotlinにおける型の世界と エラーハンドリング / Type World and Error Handling in Kotlin
makomakok
3
1.2k
Javaでも使えるKotlin OSSを目指すためのkotlin.jvmの利用とインターフェース設計/Use of kotlin.jvm and interface design for Kotlin OSS that can also be used in Java
makomakok
0
990
Slack_API_Wrapper_BoltでBotを爆速開発.pdf
makomakok
0
380
Firebase + BoltではじめるSlackアプリ開発
makomakok
0
15k
Other Decks in Programming
See All in Programming
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
1k
SREの越境 / SRE Collaboration
y0hgi
2
290
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
330
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
150
iOSDCのペンライトを自動制御したい!
akkeylab
0
240
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
280
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
730
AHC070解法紹介
eijirou
0
140
Java 27新機能 / Java 27 new features
kishida
2
180
iOSDC2026登壇資料.pdf
riofujimon
0
200
カツオ、ご期待ください
suneo3476
0
120
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
30
13k
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
850
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
540
Done Done
chrislema
187
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
The World Runs on Bad Software
bkeepers
PRO
72
12k
Crafting Experiences
bethany
1
360
Designing for Timeless Needs
cassininazir
1
510
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
850
Transcript
退屈なことは バッチにやらせよう ~ Github Actions編 @mako_makok 2021/02/24 生産性向上 Tips LT会
自己紹介 • 名前: 小林允(@mako_makok) • 所属: 株式会社ラクス • 楽楽勤怠のバックエンドエンジニア •
たまにフロントエンドもやる • Spring Boot/Java/Kotlin/TypeScript/React
生産性を上げるためには • 生産性を上げるためにはやらなくていいことはやらないようにする • ルーチンは自動化しよう ◦ 毎日の天気を調べる、新刊の情報を収集する、etc... • 自動化といえばバッチ
どのscheduler使うか問題 • Rundeck • 各種CI ◦ Github Actions ◦ Circle
CI ◦ Jenkins • cron • heroku scheduler • FaaS ◦ Lambda ◦ Cloud Functions and more...
どのscheduler使うか問題 • サーバー立てるのはカロリーが高すぎる • できればサーバレスでやりたい
どのscheduler使うか問題 • Rundeck • 各種CI ◦ Github Actions ◦ Circle
CI ◦ Jenkins • cron • heroku scheduler • FaaS ◦ Lambda ◦ Cloud Functions and more...
どのscheduler使うか問題 heroku scheduler
どのscheduler使うか問題 • Rundeck • 各種CI ◦ Github Actions ◦ Circle
CI ◦ Jenkins • cron • heroku scheduler • FaaS ◦ Lambda ◦ Cloud Functions and more...
どのscheduler使うか問題 • 定期実行するだけならGithub Actions と Circle CIどっちでもいい ◦ よりお手軽なGithub Actions
• Lambda と Cloud Functions ◦ FirestoreなどのNoSQLを利用できるので永続化層が必要そうな バッチもかける ◦ CIツールよりも豊富なトリガー
天気を通知する • ユーザー数1(自分) • 天気を取得するAPIを叩く • それを整形してSlackに通知 • 2API叩くだけなのであんまり複雑なことしなくてもできそう •
Github Actions を利用する
Github Actionsの利用手順 • Repositoryに.github/workflows/*.ymlを配置するだけ
Github Actionsの利用手順 • Repositoryに.github/workflows/*.ymlを配置するだけ 毎日9時に実行
Github Actionsの利用手順 • Repositoryに.github/workflows/*.ymlを配置するだけ 見えちゃダメそう なやつはsecret に
Github Actionsの利用手順 webpack && node dist/main.js
Github Actionsのメリット • リポジトリで管理できる • cronを実行するだけだったらあまり難しい設定はいらない • 好きな言語でかける • サーバー管理がいらない
• ちょっとしたスクリプトを定期実行したいケースに向いてる • もちろんCI, CDにも https://github.com/mako-makok/weather-notificator
まとめ • ちょっとしたバッチなどはCIツール使うと便利 • 複雑なことしたくなったらFaaSを検討してみてもいいかも