Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to develop Jenkins plugin using to ruby and Jenkins.rb

How to develop Jenkins plugin using to ruby and Jenkins.rb

Eabad423977cfc6873b8f5df62b848a6?s=128

SHIBATA Hiroshi

July 29, 2012
Tweet

Transcript

  1. ࣲాതࢤ 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 ϓϥάΠϯ࡞੒
  2. +FOLJOT6TFS $POGFSFODF5PLZP ։࠵͓ΊͰͱ͏͍͟͝·͢ɻ

  3. εϙϯαʔͷ͝঺հ

  4. ࣗݾ঺հ

  5. SHIBATA Hiroshi

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

  7. None
  8. None
  9. ձࣾ঺հ ```

  10. None
  11. ࢓ࣄ಺༰

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

  13. None
  14. None
  15. ձࣾ঺հ ऴΘΓ

  16. None
  17. ๛෋ͳϓϥάΠϯ

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

  19. None
  20. +BWB

  21. KFOLJOTSC

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

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

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

  25. KQJSC

  26. SCFOWJOTUBMMKSVCZ SCFOWTIFMMKSVCZ HFNJOTUBMMKQJ

  27. $PNNBOET KQJIFMQ<$0.."/%> KQJOFX/".& KQJHFO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SBQQFS +FOLJOT5BTLT#VJME8SBQQFS EJTQMBZ@OBNF3CFOWCVJMEXSBQQFS EFGJOJUJBMJ[F BUUST\^ FOE EFGTFUVQ CVJME MBVODIFS MJTUFOFS

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

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

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

    FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb
  52. ઃఆը໘Λ ࢖͍͍ͨ

  53. None
  54. NLEJSQWJFXTSCFOW@XSBQQFS UPVDIWJFXTSCFOW@XSBQQFS DPOpHFSC

  55.  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
  56. None
  57. KFMMZUBHMJC

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

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

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

    FOE EFGUFBSEPXO CVJME MJTUFOFS FOE FOE rbenv_wrapper.rb
  61. 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
  62. 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
  63. 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
  64. 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
  65. KQJ CVJME

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

  67. KQJ TFSWFS

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

  69. खಈςετ

  70. KQJ SFMFBTF

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

  72. ͦͷଞ

  73. UFTUVOJU PS STQFD ςετ

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

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

  76. 8SJUFZPVSQMVHJO