github / janky

Continuous integration server built on top of Jenkins and Hubot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jenkins configuration for README

jsmestad opened this issue · comments

Seems that there currently is no README docs on how to properly configure a locked down Jenkins install (we run GH OAuth plugin on our jenkins server). Can you advise on how we might use janky on this sort of setup? I am stuck at the following error:

2011-12-23T02:31:07+00:00 app[web.1]: RuntimeError - Failed to determine job existance:
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/job_creator.rb:87:in `exists?'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/job_creator.rb:37:in `run'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/job_creator.rb:9:in `run'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/builder/client.rb:41:in `setup'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/repository.rb:135:in `setup_job'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/repository.rb:116:in `setup'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/repository.rb:36:in `setup'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-6e80deca4f08/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `block in compile!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (3 levels) in route!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `block (2 levels) in route!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `block in process_route'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `block in route!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `block in call!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `block in invoke'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
2011-12-23T02:31:07+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
....

Interesting, didn't know about this plugin. Janky only supports Basic Auth right now. See Janky::Builder::HTTP and Janky::JobCreator.

For basic auth, set JANKY_BUILDER_DEFAULT to http://user:pass@example.com:8080/

Janky master should give you more detailed errors:

ERROR: Janky::Error - boomtown
         url http://127.0.0.1:9393/boomtown
    referrer
      method  GET
  user_agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
      params   {}
   remote_ip 127.0.0.1
     session   {}
         foo  bar
         app janky

/Volumes/GitHub/ci/vendor/janky/lib/janky/app.rb:75:in `GET /boomtown'
/Users/sr/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `call'
/Users/sr/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `compile!'
...

I think it would be useful to document this in the README; I eventually guessed the solution, then found this issue after it didn't work for me (now Janky fails while starting). When I figure out why, I'll share the details as a new issue in hopes of helping someone else.

@sr is this something that is possbile to support? Another idea is if your aware of having jenkins use two modes of authentication (omniauth/warden style)

@wajiii db5d652

@jsmestad I am not sure to be honest. I don't about any other authentication mode.