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
960
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
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Building an army of robots
kneath
307
47k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
New Earth Scene 8
popppiees
5
2.9k
First, design no harm
axbom
PRO
2
1.4k
Rails Girls Zürich Keynote
gr2m
96
14k
Navigating Team Friction
lara
192
16k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
310
Building Adaptive Systems
keathley
44
3.3k