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
Jenkins と cron
Search
Yohei Kawahara
April 29, 2014
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Jenkins と cron
Jenkins で cron のジョブを見える化する!
Yohei Kawahara
April 29, 2014
Transcript
30 slides
ςΩετ Jenkins ͱ cron Jenkins Ͱ cron ͷδϣϒΛݟ͑ΔԽ͠Α͏
୭ʁ @inokara
͓͢Δ͜ͱ ͜ΜͳΧΦεݟͨ͜ͱ͋Γ·͢ΑͶʁ cron δϣϒͷ݁Ռݟͯ·͔͢ʁ Jenkins ͬͯʁ Jenkins Ͱ cron ͷδϣϒΛݟ͑ΔԽ͠Α͏
σϞ
ಥવͰ͕͢…
ݟͨ͜ͱ͋Γ·͢ΑͶʁ
Ͳ͕͜ΧΦεʁ ͺͬͱݟͰԿͷδϣϒ͕ղΒͳ͍ ͺͬͱݟ୭͕ઃఆ͔ͨ͠ղΒͳ͍ ίϝϯτΞτͱ͔͞ΕͯΔ͠ ͦͦɺ݁ՌͬͯݟͯΔͷʁ
Ͱɺ݁Ռͬͯݟͯ·͔͢ʁ ͱΓࣦ͋͑ͣഊͨ͠ΒؔऀʹϝʔϧΛૹΔ /tmp/log ʹు͍͍ͯΔ͚ͩ…͔͠ /tmp/ /dev/null ʹϙʔΠ
͖͋·Μ͕ͳ…
ͦ͜Ͱ Jenkins ͷొʂ
None
Jenkins ͬͯʁʢ1ʣ ܧଓతͳΜͪΌΒʢContinuous integrationʣπʔ ϧͷҰͭ ςετͱ͔ύοέʔδϏϧυͱ͔ͰͬͯΔΑͶ όονΛ࣮ߦͯ͘͠ΕΔΑͶ ଞʹ৭ʑग़དྷΔΑʂৄ͘͠άάͬͯͶ
None
͑ɺͦͦ…Jenkins ͱ cron ͬͯ…
࿈ܞͬͯग़དྷΔͷʁ
ग़དྷ·͢ɻ
Jenkins ͬͯʁʢ2ʣ δϣϒͷεςʔλείʔυ 0 ͱͦΕҎ֎Ͱஅͯ͠ ·͢ 0 ͳΒSUCCESS 1 ຢͦΕҎ֎ͳΒ
FAILURE ͦͯ͠…
cron ͷ݁ՌΛόΠφϦΤϯίʔυͯ͠ XML ܗࣜͰεςʔλείʔυͱҰॹʹ POST ͢Δ ͱ݁ՌΛఆͯ͘͠ΕΔʂ
͏Ұ…
ʮ֎෦δϣϒͷࢹʯΛར༻ ݁ՌόΠφϦΤϯίʔυ εςʔλείʔυΛؚΊΔ XML ʹͯ͠ POST ͰϙΠ
<run> <log encoding="hexBinary">$(hexdump -v -e '1/1 "%02x"' $LOG)</log> <result>${RESULT}</result> <duration>${ELAPSED_MS}</duration>
</run>
σϞ
None
None
curl -X POST \ -d '<run><log encoding="hexBinary">4142430A</ log><result>0</result><duration>2000</ duration></run>' \
http://localhost:18080/jenkins/job/test/ postBuildResult
None
None
None
ͰɺԿ͕ΠΠͷʁ cron ͷδϣϒΛҰཡͰཧग़དྷΔ ͦΕͧΕͷδϣϒʹઆ໌͕͚ΒΕΔ ௨Λ Jenkins ʹͤΔ͜ͱ͕ग़དྷΔ ↑ʢͪΐ͍͕ඞཁʣ cron δϣϒͷॴཁ͕࣌ؒղΔ
·ͱΊ cron ͷδϣϒΧΦεʹͳΓ͕ͪ… δϣϒͷ݁Ռແࢹ͞Ε͕ͪ… Jenkins ͷδϣϒʹ݁ՌΛ POST ͢Ε݁ՌΛҰཡ ͰݟΔ͜ͱ͕ग़དྷΔʂ δϣϒͷઆ໌Λॻ͚
cron ʹઆ໌Λ͚Δ͜ͱ͕ग़ དྷΔͷͰ୭͕͍ͭͲͷΑ͏ʹઃఆ͔ͨ͠ղΔʂ
࣭ʂʁ
More Decks by Yohei Kawahara
See All by Yohei Kawahara
20191002_CircleCIMeetupFukuoka#2
inokappa
1
970
kix_009_20190429
inokappa
0
970
2019-04-18 CircleCI Meetup Fukuoka #1
inokappa
2
9.6k
開発で使える AWS の API 操作を模倣する (OSS) ツールを探してみた/JAWS-UG Kagoshima Vol.8
inokappa
1
1.4k
隙間時間を使って exercism.io を始め隊 | リモートで勉強会 #2
inokappa
0
580
Congratulations fukuokarb#100
inokappa
0
4.2k
moto を 'もっと' 使おう/PyFukuoka#4
inokappa
0
4.9k
github-enterprise-user-kai-desuyone
inokappa
0
170
Elixir and AWS Tutorial
inokappa
0
660
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Web Performance Is a Journey [PerfNow 2026]
tammyeverts
2
160
Un-Boring Meetings
codingconduct
0
510
Optimising Largest Contentful Paint
csswizardry
37
4k
エンジニアに許された特別な時間の終わり
watany
109
250k
Designing Experiences People Love
moore
143
24k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
680
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.7k
Technical Leadership for Architectural Decision Making
baasie
4
660
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
570