Rubyで簡単にremote access apiを実行する

6,596
-1

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,596
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
5
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Rubyで簡単にremote access apiを実行する

    1. 1. RubyRemote Access API Toshio Maki @Kirika_K2
    2. 2. • (@Kirika_K2)• id:Kirika / http://github.com/kirikak2/• SIer Ruby• 1 Hudson Ruby on Rails Hudson• PC MacBook Air
    3. 3. Remote Access API• Jenkins• http://jenkins-host/*****/api REST
    4. 4. Remote Access API1. Jenkins2.3. Remote Access API Ruby
    5. 5. • Ruby(1.8.7 or 1.9.2 ) Windows ActiveScriptRuby• Rubygems(1.5.0 1.7.2 )• hudson-remote-api • Dru Ibarra • https://github.com/Druwerd
    6. 6. hudson-remote-apigem hudson-remote-api$ gem install hudson-remote-api --no-ri --no-rdocFetching: hudson-remote-api-0.2.2.gem (100%)Successfully installed hudson-remote-api-0.2.21 gem installed
    7. 7. Ruby irb$ irb Rubygem>> require rubygems=> false false>> require hudson-remote-api=> true>> Hudson::Job.new(“rubynion”).build
    8. 8. Jenkins JenkinsHudson[:url] = ‘http://hogehoge:8080’Hudson[:user] = ’t-maki’Hudson[:password] = ‘password’
    9. 9. • Hudson::Job.new(“rubynion”).copy(“rubynion_copy”)• Hudson::Job.new(“rubynion”).config• Hudson::Job.new(“rubynion”).update config• Hudson::Job.new(“rubynion”).build
    10. 10. require ‘rubygems’require ‘hudson-remote-api’require ‘nokogiri’project = Hudson::Job.new(“rubynion”) XMLconfig = Nokogiri::XML.parse project.config Jenkinsconfig.at(‘/project/scm/branches/hudson.plugins.git.BranchSpec/name’) .child.content = “refs/merge/requests/#{merge-requests-num}”project.update config.to_sproject.buildproject.wait_for_build_to_finishputs Hudson::Build.new(“rubynion”, project.last_completed_build).result
    11. 11. collaborator commiter merge-requests github clone(Rails ) Gitoriousmerge-requests merge-requests merge-requests Jenkins reject
    12. 12. • hudson-remote-api • 2• github fork
    13. 13. • Remote Access API• Ruby hudson-remote-api Remote Access API• Git Subversion hook Jenkins
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×