Slide 1

Slide 1 text

ࣲాതࢤ SHIBATA Hiroshi QBQFSCPZDP BTBLVTBSC paperboy&co., Inc. How to develop Jenkins plugin using to ruby and Jenkins.rb ൃද৔ॴ+FOLJOT6TFS$POGFSFODF 2012-07-29(Sun) KFOLJOTSCͰ࢝ΊΔ 3VCZͰ+FOLJOT ϓϥάΠϯ࡞੒

Slide 2

Slide 2 text

+FOLJOT6TFS $POGFSFODF5PLZP ։࠵͓ΊͰͱ͏͍͟͝·͢ɻ

Slide 3

Slide 3 text

εϙϯαʔͷ͝঺հ

Slide 4

Slide 4 text

ࣗݾ঺հ

Slide 5

Slide 5 text

SHIBATA Hiroshi

Slide 6

Slide 6 text

http://twitter.com/hsbt/ http://www.hsbt.org/ http://github.com/hsbt/

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

ձࣾ঺հ ```

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

࢓ࣄ಺༰

Slide 12

Slide 12 text

ٕज़ج൫ ੔උ ΤϯδχΞ

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

ձࣾ঺հ ऴΘΓ

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

๛෋ͳϓϥάΠϯ

Slide 18

Slide 18 text

ࣗ෼Ͱ΋ϓ ϥάΠϯͳ Β࡞Εͦ͏ ͳؾ͕͢Δ

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

+BWB

Slide 21

Slide 21 text

KFOLJOTSC

Slide 22

Slide 22 text

1.KBWBSVOUJNF 4.SVCZUPPMTKQJ 3.SVCZUPPMTDMJ 2.SVCZSVOUJNF

Slide 23

Slide 23 text

KBWBSVOUJNF SVCZSVOUJNF +FOLJOTʹ+3VCZΛ ૊ΈࠐΉ +FOLJOTͷ+BWBΫϥε Λ+3VCZͰϥούʔ͢Δ

Slide 24

Slide 24 text

SVCZUPPMTDMJ SVCZUPPMTKQJ KFOLJOTΛૢ࡞͢Δౕ ࠓ೔͸ͳ͢͜ͱ

Slide 25

Slide 25 text

KQJSC

Slide 26

Slide 26 text

SCFOWJOTUBMMKSVCZ SCFOWTIFMMKSVCZ HFNJOTUBMMKQJ

Slide 27

Slide 27 text

$PNNBOET KQJIFMQ<$0.."/%> KQJOFX/".& KQJHFOFSBUF KQJCVJME KQJTFSWFS KQJSFMFBTF KQJWFSTJPO

Slide 28

Slide 28 text

KQJ IFMQ KQJ WFSTJPO

Slide 29

Slide 29 text

লུ

Slide 30

Slide 30 text

KQJ OFX

Slide 31

Slide 31 text

KQJOFXSCFOW DSFBUFSCFOW(FNpMF DSFBUFSCFOWKFOLJOT SCFOWQMVHJOTQFD

Slide 32

Slide 32 text

TPVSDFSVCZHFNT HFNKFOLJOTQMVHJOSVOUJNF d Gemfile

Slide 33

Slide 33 text

+FOLJOT1MVHJO4QFDJpDBUJPOOFXEPcQMVHJOc QMVHJOOBNFKFOLJOTSCFOW QMVHJOEJTQMBZ@OBNF+FOLJOT3CFOW1MVHJO QMVHJOWFSTJPO QMVHJOEFTDSJQUJPO50%0FOUFSEFTDSJQUJPO IFSF QMVHJOVSMIUUQTXJLJKFOLJOTDJPSH EJTQMBZ+&/,*/4+FOLJOT3CFOW1MVHJO QMVHJOEFWFMPQFE@CZTIJCBUBIJSPTIJ 4)*#"5")JSPTIJTIJCBUBIJSPTIJ!HNBJMDPN QMVHJOVTFT@SFQPTJUPSZHJUIVCKFOLJOT SCFOWQMVHJO QMVHJOEFQFOET@POSVCZSVOUJNF FOE jenkins-rbenv.pluginspec

Slide 34

Slide 34 text

+FOLJOT1MVHJO4QFDJpDBUJPOOFXEPcQMVHJOc QMVHJOOBNFKFOLJOTSCFOW QMVHJOEJTQMBZ@OBNF+FOLJOT3CFOW1MVHJO QMVHJOWFSTJPO QMVHJOEFTDSJQUJPO50%0FOUFSEFTDSJQUJPO IFSF QMVHJOVSMIUUQTXJLJKFOLJOTDJPSH EJTQMBZ+&/,*/4+FOLJOT3CFOW1MVHJO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HJO QMVHJOEFQFOET@POSVCZSVOUJNF FOE jenkins-rbenv.pluginspec

Slide 40

Slide 40 text

+FOLJOT1MVHJO4QFDJpDBUJPOOFXEPcQMVHJOc QMVHJOOBNFKFOLJOTSCFOW QMVHJOEJTQMBZ@OBNF+FOLJOT3CFOW1MVHJO QMVHJOWFSTJPO QMVHJOEFTDSJQUJPO50%0FOUFSEFTDSJQUJPO IFSF QMVHJOVSMIUUQTXJLJKFOLJOTDJPSH EJTQMBZ+&/,*/4+FOLJOT3CFOW1MVHJO QMVHJOEFWFMPQFE@CZTIJCBUBIJSPTIJ 4)*#"5")JSPTIJTIJCBUBIJSPTIJ!HNBJMDPN QMVHJOVTFT@SFQPTJUPSZHJUIVCKFOLJOT SCFOWQMVHJO QMVHJOEFQFOET@POSVCZSVOUJNF FOE jenkins-rbenv.pluginspec

Slide 41

Slide 41 text

+FOLJOT1MVHJO4QFDJpDBUJPOOFXEPcQMVHJOc QMVHJOOBNFKFOLJOTSCFOW QMVHJOEJTQMBZ@OBNF+FOLJOT3CFOW1MVHJO QMVHJOWFSTJPO QMVHJOEFTDSJQUJPO50%0FOUFSEFTDSJQUJPO IFSF QMVHJOVSMIUUQTXJLJKFOLJOTDJPSH EJTQMBZ+&/,*/4+FOLJOT3CFOW1MVHJO QMVHJOEFWFMPQFE@CZTIJCBUBIJSPTIJ 4)*#"5")JSPTIJTIJCBUBIJSPTIJ!HNBJMDPN QMVHJOVTFT@SFQPTJUPSZHJUIVCKFOLJOT SCFOWQMVHJO QMVHJOEFQFOET@POSVCZSVOUJNF FOE jenkins-rbenv.pluginspec

Slide 42

Slide 42 text

KQJ HFOFSBUF

Slide 43

Slide 43 text

"WBJMBCMF(FOFSBUPST QVCMJTIFS CVJMEFS XSBQQFS OPEF@QSPQFSUZ SVO@MJTUFOFS DPNQVUFS@MJTUFOFS

Slide 44

Slide 44 text

1.QVCMJTIFS 3.XSBQQFS 2.CVJMEFS ϏϧυޙʹԿ͔΍Δ Ϗϧυͱͯ͠Կ͔΍Δ ϏϧυલޙʹॲཧΛڬΉ

Slide 45

Slide 45 text

4.OPEF@QSPQFSUZ 6.DPNQVUFS@MJTUFOFS 5.SVO@MJTUFOFS jenkins ͷ node ઃఆ Ϗϧυͷ׬ྃΛड͚औͬ ͯԿ͔΍Δ εςʔλε͕มΘͬͨ࣌ ʹԿ͔΍Δ

Slide 46

Slide 46 text

XSBQQFS Λ࡞ͬͯΈΑ͏

Slide 47

Slide 47 text

DESCFOW KQJHFOFSBUFXSBQQFS SCFOW DSFBUFNPEFMT SCFOW@XSBQQFSSC

Slide 48

Slide 48 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 49

Slide 49 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 50

Slide 50 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 51

Slide 51 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 52

Slide 52 text

ઃఆը໘Λ ࢖͍͍ͨ

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

NLEJSQWJFXTSCFOW@XSBQQFS UPVDIWJFXTSCFOW@XSBQQFS DPOpHFSC

Slide 55

Slide 55 text

GUBHMJC MJCGPSN GFOUSZ UJUMF7FSTJPO pFME WFSTJPO EFTDSJQUJPO36#: TVDIBT Q EP GUFYUCPY FOE GFOUSZ UJUMF1SFJOTUBMMHFNMJTU pFME HFN@MJTU EFTDSJQUJPOFYCVOEMFS SBLF EP GUFYUCPY WBMVFCVOEMFS SBLF FOE config.erb

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

KFMMZUBHMJC

Slide 58

Slide 58 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 59

Slide 59 text

BUUS@BDDFTTPSWFSTJPO EFGJOJUJBMJ[F BUUST\^ !WFSTJPO BUUST<WFSTJPO> FOE rbenv_wrapper.rb

Slide 60

Slide 60 text

DMBTT3CFOW8SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb

Slide 61

Slide 61 text

JOTUBMM@QBUIdSCFOWWFSTJPOT\!WFSTJPO^ CFHJO VOMFTT'JMF5FTUEJSFDUPSZ 'JMFFYQBOE@QBUI dSCFOW MJTUFOFS*OTUBMMSCFOWaO MBVODIFSFYFDVUF CBTI D HJUDMPOF \3#&/7@1"5)^dSCFOW \PVUMJTUFOFS^ FOE SFTDVF CVJMEBCPSU FOE rbenv_wrapper.rb

Slide 62

Slide 62 text

JOTUBMM@QBUIdSCFOWWFSTJPOT\!WFSTJPO^ CFHJO VOMFTT'JMF5FTUEJSFDUPSZ 'JMFFYQBOE@QBUI dSCFOW MJTUFOFS*OTUBMMSCFOWaO MBVODIFSFYFDVUF CBTI D HJUDMPOF \3#&/7@1"5)^dSCFOW \PVUMJTUFOFS^ FOE SFTDVF CVJMEBCPSU FOE rbenv_wrapper.rb

Slide 63

Slide 63 text

JOTUBMM@QBUIdSCFOWWFSTJPOT\!WFSTJPO^ CFHJO VOMFTT'JMF5FTUEJSFDUPSZ 'JMFFYQBOE@QBUI dSCFOW MJTUFOFS*OTUBMMSCFOWaO MBVODIFSFYFDVUF CBTI D HJUDMPOF \3#&/7@1"5)^dSCFOW \PVUMJTUFOFS^ FOE SFTDVF CVJMEBCPSU FOE rbenv_wrapper.rb

Slide 64

Slide 64 text

JOTUBMM@QBUIdSCFOWWFSTJPOT\!WFSTJPO^ CFHJO VOMFTT'JMF5FTUEJSFDUPSZ 'JMFFYQBOE@QBUI dSCFOW MJTUFOFS*OTUBMMSCFOWaO MBVODIFSFYFDVUF CBTI D HJUDMPOF \3#&/7@1"5)^dSCFOW \PVUMJTUFOFS^ FOE SFTDVF CVJMEBCPSU FOE rbenv_wrapper.rb

Slide 65

Slide 65 text

KQJ CVJME

Slide 66

Slide 66 text

1.QMVHJOTQFD͔Β QPNYNMΛੜ੒ 2.IQJϑΝΠϧΛੜ ੒

Slide 67

Slide 67 text

KQJ TFSWFS

Slide 68

Slide 68 text

QMVHJOΛ ಡΈࠐΜͩ +FOLJOT Λىಈ͢Δ

Slide 69

Slide 69 text

खಈςετ

Slide 70

Slide 70 text

KQJ SFMFBTF

Slide 71

Slide 71 text

1.KFOLJOTDJPSHʹΞο ϓϩʔυ͢Δ 3.Ҿ਺ແ͠͸TOBQTIPU SFMFBTFΛ෇͚Δͱ QSPEVDUJPO 2.dKFOLJOTDJPSHͷ ΞΧ΢ϯτ৘ใΛ࢖༻

Slide 72

Slide 72 text

ͦͷଞ

Slide 73

Slide 73 text

UFTUVOJU PS STQFD ςετ

Slide 74

Slide 74 text

࢖͑ͳ͍ͷͰ +BWBϥΠϒϥϦ ͰؤுΔ rubygems

Slide 75

Slide 75 text

etc https://github.com/jenkinsci/rvm-plugin https://github.com/hsbt/jenkins-rbenv-plugin https://github.com/takai/jenkins-hipchat-publisher-plugin

Slide 76

Slide 76 text

8SJUFZPVSQMVHJO