Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Jenkinsで伺かしてみる
Search
matuyuji
April 05, 2013
Technology
0
5.4k
Jenkinsで伺かしてみる
SSP(伺か)とその通信プロトコルであるSSTPを用いて、JenkinsからSSPへのビルド失敗時の通知などを行います。
matuyuji
April 05, 2013
Tweet
Share
More Decks by matuyuji
See All by matuyuji
Emacs × Touch Bar
matuyuji
2
1.7k
ARKit + SceneKitでMinesweeperを作ってみた
matuyuji
1
760
Go + QtでiOS アプリ開発
matuyuji
0
370
@_specialized なお話し
matuyuji
0
460
Xcode Souce Code Extensionを使ってみた
matuyuji
0
330
Codebeatを 試してみた
matuyuji
0
720
React Nativeで UIコンポーネントをつくる
matuyuji
0
980
React Nativeを使ってみた
matuyuji
0
1.2k
SwiftでLens
matuyuji
1
930
Other Decks in Technology
See All in Technology
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.6k
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
360
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
[FOSS4G 2019 Niigata] AIによる効率的危険斜面抽出システムの開発について
nssv
0
310
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
380
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
270
Taming you application's environments
salaboy
0
180
Featured
See All Featured
How to Ace a Technical Interview
jacobian
276
23k
The Invisible Side of Design
smashingmag
298
50k
The Language of Interfaces
destraynor
154
24k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
A designer walks into a library…
pauljervisheath
203
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Thoughts on Productivity
jonyablonski
67
4.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Transcript
JenkinsͰ ͔ ͯ͠ΈΔ @matuyuji 2013.4.9 ୈ3ճ Jenkinsେࡕษڧձ 134݄5༵ۚ
͓ͬ͞Μͱձ͍ͨ͠ Ϗϧυ͕յΕ·ͨ͠ ͲΕ? (Πϝʔδը૾) ͜ΕͰ͢ ͓͍ͯͨ͠ Ϗϧυ͓͖ͯ͠·͢Ͷ 134݄5༵ۚ
Agenda γεςϜߏ SSP/SSTPʹ͍ͭͯ Jenkins࿈ܞ ͦͷଞ & ·ͱΊ Jenkinsͷ΄ͱΜͲ͋Γ·ͤΜ 134݄5༵ۚ
ࣗݾհ @matuyuji safx-dev.blogspot.jp 134݄5༵ۚ
SSPΞϓϦ ΰʔετ γεςϜߏ 134݄5༵ۚ
σεΫτοϓϚείοτ ِϖϧιφΣΞ Կ͔ɻ(Ծ) → ͔ SAKURA Script Player → SSP
ِྛޝ (Mac OS X 10.6·Ͱ) 134݄5༵ۚ
ΰʔετ Jenkins Hudson 134݄5༵ۚ
γεςϜߏ Jenkins SSP SomeProject NotifyWithSSTP Ghost SSTP Ghost 134݄5༵ۚ
SSTPϓϩτίϧ SakuraεΫϦϓτ SSP/SSTP ʹ͍ͭͯ 134݄5༵ۚ
ΒͤΔ ϙʔτ9801ʹจࣈྻΛૹΓࠐΉ $ cat notify NOTIFY SSTP/1.1 Charset: UTF-8 Sender:
Jenkins-Server Script: \0Ϗϧυʹࣦഊ͠·ͨ͠ɻ\e $ nc 127.0.0.1 9801 < notify SSTP/1.1 200 OK 134݄5༵ۚ
Demo 134݄5༵ۚ
SakuraεΫϦϓτ \0 ϝΠϯΩϟϥΫλΛࢦఆ \1 αϒΩϟϥΫλΛࢦఆ \v ΰʔετΛશ໘ʹҠಈ \w# ΣΠτ \s#
αʔϑΣε ද มߋ \_a[] ΞϯΧʔ࡞ \q[] ࣭࡞ ΄͔ɺͨ͘͞Μ 134݄5༵ۚ
දΛม͑Δ 0: ૉ 1: রΕ 2: ڻ͖ 3: ෆ҆ 4:
མͪࠐΈ 5: ඍসΈ 6: ด͡ 7: ౖΓ 8: ྫྷস 9: রΕౖΓ 134݄5༵ۚ
SSTP IANAͷRegistered Port Numbersʹొ͋Γ sstp-1 7743/tcp Sakura Script Transfer Protocol
sstp-1 7743/udp Sakura Script Transfer Protocol sstp-2 9801/tcp Sakura Script Transfer Protocol-2 sstp-2 9801/udp Sakura Script Transfer Protocol-2 134݄5༵ۚ
Jenkinsͱͷ ࿈ܞ 134݄5༵ۚ
Jenkins → SSP SomeProject NotifyWithSSTP Parameterized Trigger plugin 134݄5༵ۚ
\0\v\s4\f[height,36]...Ϗϧυʹࣦഊ͠·ͨ͠ɻ \w9\s7\![move,300,0,1000,me]\![move,-300,0,1000,me] \s0\1\f[height,24]\ͤɻ\n \_a[${UPSTREAM_BUILD_URL}]${UPSTREAM_JOB_NAME}\_a\e 134݄5༵ۚ
ΰʔετͷߏ MacͰಈ͔͢ ͦͷଞ 134݄5༵ۚ
ΰʔετͷߏ Shiori Event OnBoot OnAITalk Shiori.dll ཬʑ YAYA (C-like) ը૾ͷఆٛ
ணͤସ͑ Ξχϝʔγϣϯ shell ghost 134݄5༵ۚ
MouseDoubleClick_0Head { ! "\1\s[10]\0\s[0] \![execute,http-get,http://127.0.0.1:8080/job/ AlwaysFailed/build?token=foobar] ಄ΛμϒϧΫϦοΫ͞ΕͨͷͰɺϏϧυΛ։࢝͠·͢ɻ\e" } ΠϕϯτఆٛϑΝΠϧʹهड़ Πϕϯτ
$ nc -l 127.0.0.1 8080 GET /job/AlwaysFailed/build?token=foobar HTTP/1.1 Host: 127.0.0.1:8080 User-Agent: SSP/2.2.99 (20130204-14; Windows NT 5.1) Accept-Encoding: gzip,deflate Connection: close Accept-Charset: utf-8,* Accept: text/*,*/* 134݄5༵ۚ
ಠࣗΠϕϯτ OnBuildFailed { "\0\vϏϧυʹࣦഊ͠·ͨ͠ɻ\1ͳΜͱ͔͠Ζ\e" } $ nc 127.0.0.1 9801 <<EOF
NOTIFY SSTP/1.1 Sender: Jenkins-Server Event: OnBuildFailed EOF SSTP/1.1 200 OK ΠϕϯτఆٛϑΝΠϧʹهड़ 134݄5༵ۚ
ڥม MouseDoubleClick_1 { ! "\0ࢲͷ໊લ%selfnameͰ͢ɻ\n ࠓ %month ݄ %day Ͱ͢ɻ\e"
} 134݄5༵ۚ
Mac্ͰSSPΛಈ͔͢ ॳճىಈ࣌ͳͲʹਅͬ ࠇʹͳΔͷΛ͙ JenkinsͷσϑΥϧτγΣϧΛzshʹ͢Δ ($JOB_NAME͕ͳ͔ۭͥʹͳΔରࡦ) എܠΛಁաʹ 134݄5༵ۚ
·ͱΊ 134݄5༵ۚ
·ͱΊ SSPΛར༻ͯ͠JenkinsͷΰʔετΛ࡞ͨ͠ JenkinsͷϏϧυࣦഊΛ௨Ͱ͖ΔΑ͏ʹͨ͠ 134݄5༵ۚ
ࢀߟࢿྉ SSP: http://ssp.shillest.net/ YAYA: http://emily.shillest.net/ayaya/index.php UkaDoc: https://ukadoc.googlecode.com/svn/ trunk/manual/index.html 134݄5༵ۚ
͓͠·͍ 134݄5༵ۚ