Git Product home page Git Product logo

janky's Introduction

Janky

As of April 2022, this repository is no longer used or maintained.


This is Janky, a continuous integration server built on top of Jenkins, controlled by Hubot, and designed for GitHub.

  • Built on top of Jenkins. The power, vast amount of plugins and large community of the popular CI server all wrapped up in a great experience.

  • Controlled by Hubot. Day to day operations are exposed as simple Hubot commands that the whole team can use.

  • Designed for GitHub. Janky creates the appropriate web hooks for you and the web app restricts access to members of your GitHub organization.

Hubot usage

Start by setting up a new Jenkins job and GitHub web hook for a repository: [ORG]/[REPO]

hubot ci setup github/janky

The setup command can safely be run over and over again. It won't do anything unless it needs to. It takes an optional name argument: [ORG]/[REPO] [NAME]

hubot ci setup github/janky janky-ruby1.9.2

It also takes an optional template argument: [ORG]/[REPO] [NAME] [TEMPLATE]

hubot ci setup github/janky janky-ruby1.9.2 ruby-build

All branches are built automatically on push. Disable auto build with:

hubot ci toggle [REPO]

NOTE: If name was set you'll need to use it intested.

hubot ci toggle [NAME]

Run the command again to re-enable it. Force a build of the master branch:

hubot ci build [REPO]

NOTE: If name was set you'll need to use it intested.

hubot ci build [NAME]

Of a specific branch: [REPO]/[BRANCH]

hubot ci build janky/libgit2

Different builds aren't relevant to the same chat room and so Janky lets you choose where notifications are sent to. First get a list of available rooms:

hubot ci rooms

Then pick one:

hubot ci set room janky The Serious Room

Get the status of a build:

hubot ci status janky

Specific branch: [REPO]/[BRANCH]

hubot ci status janky/libgit2

All builds:

hubot ci status

Finally, get a quick reference of the available commands with:

hubot ci?

Installing

Jenkins

Janky requires access to a Jenkins server. Version 1.580 is recommended. Refer to the Jenkins documentation for installation instructions and install the Notification Plugin version 1.4.

Remember to set the Jenkins URL in http://your-jenkins-server.com/configure. Janky will still trigger builds but will not update the build status without this set.

Deploying

Janky is designed to be deployed to Heroku.

Grab all the necessary files from the gist:

$ git clone git://gist.github.com/1497335 janky

Then push it up to a new Heroku app:

$ cd janky
$ heroku create --stack cedar
$ bundle install
$ git add Gemfile.lock
$ git commit Gemfile.lock -m "lock bundle"
$ git push heroku master

After configuring the app (see below), create the database:

$ heroku run rake db:migrate

NOTE: Ruby version 2.0.0+ is required to run Janky.

Upgrading

We strongly recommend backing up your Janky database before upgrading.

The general process is to then upgrade the gem, and then run migrate. Here is how you do that on a local box you have access to (this process will differ for Heroku):

cd [PATH-TO-JANKY]
gem update janky
rake db:migrate

Configuring

Janky is configured using environment variables. Use the heroku config command:

$ heroku config:add VARIABLE=value

Required settings:

  • JANKY_BASE_URL: The application URL with a trailing slash. Example: http://mf-doom-42.herokuapp.com/.
  • JANKY_BUILDER_DEFAULT: The Jenkins server URL with a trailing slash. Example: http://jenkins.example.com/. For basic auth, include the credentials in the URL: http://user:[email protected]/. Using GitHub OAuth with Jenkins is not supported by Janky.
  • JANKY_CONFIG_DIR: Directory where build config templates are stored. Typically set to /app/config on Heroku.
  • JANKY_HUBOT_USER: Login used to protect the Hubot API.
  • JANKY_HUBOT_PASSWORD: Password for the Hubot API.
  • JANKY_GITHUB_USER: The login of the GitHub user used to access the API. Requires Administrative privileges to set up service hooks.
  • JANKY_GITHUB_PASSWORD: The password for the GitHub user.
  • JANKY_GITHUB_HOOK_SECRET: Secret used to sign hook requests from GitHub.
  • JANKY_CHAT_DEFAULT_ROOM: Chat room where notifications are sent by default.

Optional database settings:

  • DATABASE_URL: Database connection URL. Example: postgres://user:password@host:port/db_name.
  • JANKY_DATABASE_SOCKET: Path to the database socket. Example: /var/run/mysql5/mysqld.sock.

GitHub Enterprise

Using Janky with GitHub Enterprise requires one extra setting:

  • JANKY_GITHUB_API_URL: Full API URL of the instance, with a trailing slash. Example: https://github.example.com/api/v3/.

GitHub Status API

https://github.com/blog/1227-commit-status-api

To update pull requests with the build status generate an OAuth token via the GitHub API:

curl -u username:password \
  -d '{ "scopes": [ "repo:status" ], "note": "janky" }' \
  https://api.github.com/authorizations

then set JANKY_GITHUB_STATUS_TOKEN. Optionally, you can also set JANKY_GITHUB_STATUS_CONTEXT to send a context to the GitHub API by default

username and password in the above example should be the same as the values provided for JANKY_GITHUB_USER and JANKY_GITHUB_PASSWORD respectively.

Chat notifications

HipChat

Required settings:

  • JANKY_CHAT=hipchat
  • JANKY_CHAT_HIPCHAT_TOKEN: authentication token (This token needs to be an admin token, not a notification token.)
  • JANKY_CHAT_HIPCHAT_FROM: name that messages will appear be sent from. Defaults to CI.
  • JANKY_HUBOT_USER should be XMPP/Jabber username in format xxxxx_xxxxxx rather than email
  • JANKY_CHAT_DEFAULT_ROOM should be the name of the room instead of the XMPP format, for example: Engineers instead of xxxx_xxxxxx.

Installation:

  • Add require "janky/chat_service/hipchat" to the config/environment.rb file before the Janky.setup(ENV) line.
  • echo 'gem "hipchat", "~>0.4"' >> Gemfile
  • bundle
  • git commit -am "install hipchat"

Slack

Required settings:

  • JANKY_CHAT=slack
  • JANKY_CHAT_SLACK_TEAM: slack team name
  • JANKY_CHAT_SLACK_TOKEN: authentication token for the user sending build notifications.
  • JANKY_CHAT_SLACK_USERNAME: name that messages will appear be sent from. Defaults to CI.
  • JANKY_CHAT_SLACK_ICON_URL: URL to an image to use as the icon for this message.

Installation:

  • Add require "janky/chat_service/slack" to the config/environment.rb file before the Janky.setup(ENV) line.
  • echo 'gem "slack.rb"' >> Gemfile
  • bundle
  • git commit -am "install slack"

Hubot

Sends notifications to Hubot via janky script.

Required settings:

  • JANKY_CHAT=hubot
  • JANKY_CHAT_HUBOT_URL: URL to your Hubot instance.
  • JANKY_CHAT_HUBOT_ROOMS: List of rooms which can be set via ci set room.
    • For IRC: Comma-separated list of channels "#room, #another-room"
    • For Campfire/HipChat: List with room id and name "34343:room, 23223:another-room"
    • For Slack: List with room names "room, another-room"

Installation:

  • Add require "janky/chat_service/hubot" to the config/environment.rb file before the Janky.setup(ENV) line.

Authentication

To restrict access to members of a GitHub organization, register a new OAuth application on GitHub with the callback set to $JANKY_BASE_URL/auth/github/callback then set a few extra settings:

  • JANKY_SESSION_SECRET: Random session cookie secret. Typically generated by a tool like pwgen.
  • JANKY_AUTH_CLIENT_ID: The client ID of the OAuth application.
  • JANKY_AUTH_CLIENT_SECRET: The client secret of the OAuth application.
  • JANKY_AUTH_ORGANIZATION: The organization name. Example: "github".
  • JANKY_AUTH_TEAM_ID: An optional team ID to give auth to. Example: "1234".

Hubot

Install the janky script in your Hubot then set the HUBOT_JANKY_URL environment variable. Example: http://user:[email protected]/_hubot/, with user and password replaced by JANKY_HUBOT_USER and JANKY_HUBOT_PASSWORD respectively.

Custom build configuration

The default build command should suffice for most Ruby applications:

$ bundle install --path vendor/gems --binstubs
$ bundle exec rake

For more control you can add a script/cibuild at the root of your repository for Jenkins to execute instead.

For total control, whole Jenkins' config.xml files can be associated with Janky builds. Given a build called windows and a template name of psake, Janky will try config/jobs/psake.xml.erb to use a template, config/jobs/windows.xml.erb to try the job name if the template does not exit, before finally falling back to the default configuration, config/jobs/default.xml.erb. After updating or adding a custom config, run hubot ci setup again to update the Jenkins server.

Hacking

Docker and docker-compose are required for hacking on this project.

Get your environment up and running:

script/bootstrap

Create the databases, tables, and seed data:

script/setup

Start the server:

docker-compose run --service-ports app script/server

Open the app:

open http://localhost:9393/

Run the test suite:

docker-compose run --rm app script/test

Contributing

Fork the Janky repository on GitHub and send a Pull Request. Note that any changes to behavior without tests will be rejected. If you are adding significant new features, please add both tests and documentation.

Maintainers

Copying

Copyright © 2011-2014, GitHub, Inc. See the COPYING file for license rights and limitations (MIT).

janky's People

Contributors

akatz avatar aroben avatar atmos avatar calavera avatar calmyournerves avatar chrislundquist avatar dustyburwell avatar ejholmes avatar ellneal avatar gargola avatar iristyle avatar jakedouglas avatar jessedearing avatar jsmestad avatar jspahrsummers avatar lucasmazza avatar mal avatar mattr- avatar mbartmann avatar mhfs avatar parkr avatar reprazent avatar rileytg avatar rsanheim avatar schisamo avatar shayfrendt avatar sr avatar tombell avatar vivek avatar wfarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

janky's Issues

Feature request: heroku management?

So far Janky has been great to manage Jenkins and the CI process, but it'd really shine if it could also manage the deployments to Heroku. ie: deploy to staging or production, run migrations and/or data clones, etc.

Heroku R13 Error - Type Error, can't convert nil into string

When I try to access the heroku webapp I get following error message:

heroku[router]: Error H13 (Connection closed without response) -> GET janky-master.herokuapp.com/ dyno=web.1 queue= wait= service= status=503 bytes= TypeError - can't convert nil into String:

When I tell hubot to hubot ci setup codegestalt/yunorails I get:

heroku[router]: Error H13 (Connection closed without response) -> GET janky-master.herokuapp.com/favicon.ico dyno=web.1 queue= wait= service= status=503 bytes= heroku[router]: Error H16 (Redirect to herokuapp.com) -> POST janky-master.herokuapp.com/_hubot/setup dyno= queue= wait= service= status=301 bytes=

Any ideas?

Link to the Jenkins build page

There's no real way to jump to Jenkins from Janky right now, which is super inconvenient whenever a feature exists in Jenkins that is not currently exposed by Janky (e.g., build artifacts).

It'd be nice if the disclosure arrow opened up the console on Jenkins, instead of just inserting all the text inline.

Can't run ci setup

I get a error when running hubot ci setup

2012-02-01T22:18:16+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST janky.tso.net/_hubot/setup dyno=web.1 queue= wait= service= status=503 bytes=
2012-02-01T22:18:16+00:00 app[web.1]: Errno::ECONNREFUSED - Connection refused - connect(2):
2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:644:in initialize' 2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:644:inopen'
2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:644:in block in connect' 2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:637:indo_start'
2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:626:in start' 2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:1168:inrequest'
2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:in request' 2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/job_creator.rb:78:inexists?'
2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/job_creator.rb:37:in run' 2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/builder/client.rb:41:insetup'
2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/net/http.rb:644:in connect' 2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/timeout.rb:44:intimeout'
2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/repository.rb:36:in setup' 2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/hubot.rb:15:inblock in class:Hubot'
2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/job_creator.rb:9:in run' 2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:inblock (3 levels) in route!'
2012-02-01T22:18:16+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in call' 2012-02-01T22:18:16+00:00 app[web.1]: /usr/local/lib/ruby/1.9.1/timeout.rb:89:intimeout'

Unknown branch "master"

I ran setup successfully and there is a post receive hook set up on github.

maletor: Setup organization at [email protected]:organization/project | http://danky.herokuapp.com//organization

hubot ci build organization comes back with
Unknown branch "master". Push again

No exception. Here's the logs:

2012-02-09T18:02:24+00:00 heroku[router]: POST danky.herokuapp.com/_hubot/organization/master dyno=web.1 queue=0 wait=0ms service=12ms status=404 bytes=35

Using Janky at master.

How to extend Janky?

Does it possible for janky to sent http request to my script when build triggered/finished?

I would like to write script on python that will post build result to pull request, like this

img

invalid value for Interger(): "janky":

When trying to build I get the following stacktrace from Heroku:

2012-02-03T22:24:27+00:00 heroku[router]: POST sonybot-janky.herokuapp.com/_hubot/toggle/dope dyno=web.1 queue=0 wait=0ms service=102ms status=200 bytes=20
2012-02-03T22:24:32+00:00 heroku[router]: POST sonybot-janky.herokuapp.com/_hubot/toggle/dope dyno=web.1 queue=0 wait=0ms service=13ms status=200 bytes=19
2012-02-03T22:24:37+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST sonybot-janky.herokuapp.com/_hubot/dope/master dyno=web.1 queue= wait= service= status=503 bytes=
2012-02-03T22:24:37+00:00 app[web.1]: ArgumentError - invalid value for Integer(): "janky":
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/hubot.rb:38:in `Integer'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/hubot.rb:38:in `block in '
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `block in compile!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1211:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/auth/basic.rb:25:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.0/lib/janky/exception.rb:44:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
2012-02-03T22:24:37+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'

I also noticed that the setup command created a workspace in Jenkins called "cd1e1518748846d5ece76e7556954cc4". This doesn't seem right.

Jenkins error

Feb 10, 2012 4:52:19 AM hudson.model.DownloadService$Downloadable doPostBack
INFO: Obtained the updated data file for hudson.tools.JDKInstaller
[Winstone 2012/02/10 04:52:35] - Called getInputStream after getParameter ... error
Feb 10, 2012 4:52:35 AM hudson.util.CopyOnWriteList$ConverterImpl unmarshal
WARNING: Failed to resolve class
com.thoughtworks.xstream.mapper.CannotResolveClassException: com.tikal.hudson.plugins.notification.HudsonNotificationProperty : com.tikal.hudson.plugins.notification.HudsonNotificationProperty
        at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
        at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
        at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88)
        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)

Campfire notifications should link to Janky, not diffs

When I get a Campfire notification about the success or failure of a build, seeing its diff is not at all useful to me. I want to jump to the Janky build job so I can see the console log, get build artifacts (#92, #93), etc.

It's also worth noting that the diff can be viewed from the Janky page anyways.

"Unknown branch" + "Shit's being weird" messages when building

"Unknown branch" and "Shit's being weird"

When
me -> hubot ci setup $organization/$repo
It creates the build task in Jenkins correcty and outputs the work.

When
me -> hubot ci build $repo
hubot -> Unknown branch "master". Push again
hubot -> Can't go HAM on web/master, shit's being weird.

When
me -> hubot ci status $repo/$branch
Doesn't return anything

When
me -> hubot ci status
hubot -> $repo no build Publishing [email protected]:$organization/$repo

Our IT

  • Hubot on Heroku
  • Janky on Heroku
  • Jenkins on Cloudbees

Any thoughts?

Configuration Issue?

Never done this before, so I'm likely doing something wrong. Easily installed Janky on Heroku. My configuration is suspect. Point me in the right direction.

JANKY CONFIG

JANKY_BASE_URL:  _Application URL_
JANKY_BUILDER_DEFAULT:  _Jenkins Server URL_
JANKY_CONFIG_DIR:  _/app/config_
JANKY_HUBOT_USER:  _FooUser_
JANKY_HUBOT_PASSWORD: _FooPasswd_
JANKY_GITHUB_USER: _My Github Username_
JANKY_GITHUB_PASSWORD: _My Github Password_
JANKY_GITHUB_HOOK_SECRET: _My API Key_
JANKY_CAMPFIRE_ACCOUNT: _My Campfire UserAccount_
JANKY_CAMPFIRE_TOKEN: _My Campfire API Key_
JANKY_CAMPFIRE_DEFAULT_ROOM _Room ID_

HUBOT CONFIG

HUBOT_JANKY_URL: http://_FooUser_:_FooPasswd_@janky_foo.herokuapp.com/_hubot/

Logs.

2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `'
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2011-12-20T21:13:40+00:00 app[web.1]: ActiveRecord::StatementInvalid - PGError: ERROR:  relation "repositories" does not exist
2011-12-20T21:13:40+00:00 app[web.1]: :             SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
2011-12-20T21:13:40+00:00 app[web.1]:              WHERE a.attrelid = '"repositories"'::regclass
2011-12-20T21:13:40+00:00 app[web.1]:                AND a.attnum > 0 AND NOT a.attisdropped
2011-12-20T21:13:40+00:00 app[web.1]:              ORDER BY a.attnum
2011-12-20T21:13:40+00:00 app[web.1]: :
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:1021:in `async_exec'
2011-12-20T21:13:40+00:00 app[web.1]:               FROM pg_attribute a LEFT JOIN pg_attrdef d
2011-12-20T21:13:40+00:00 app[web.1]:                 ON a.attrelid = d.adrelid AND a.attnum = d.adnum
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `'
2011-12-20T21:13:40+00:00 app[web.1]:   /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:244:in `block in log'

Build status and building specific branches?

Even while I can see Jenkins building, the bot is still saying "no build"

Also, when I try to do tsbot ci status Repo/branch I get "Unknown branch "branchname". Push again"

When I push a branch, Jenkins starts the build, but the bot still shows "no build" in status, and doing a "ci status Repo/branch" doesn't return anything.

Hubot is not loading the janky.coffee

When I install hubot on a local server, putting janky.coffee in the hubot-scripts.json doesn't load janky.coffee

If I put the file in a directory (scripts) it doesn't error out, but "ci" never shows up when I do hubot help

In Heroku it works fine.

Janky Front-end doesn't have build info

We recently moved our jenkins server to a different IP and changed the DNS record accordingly.

All of the setup, build, and room command work and don't report errors. However, the front end interface only has old build data and not the new build data that is present on the new jenkins server.

Can't setup repo with a period in the name

Given a repo bar.com the following is thrown when running hubot ci setup foo/bar.com.

2012-06-24T00:57:53+00:00 app[web.1]: ERROR: Janky::Error - Failed to create hook
2012-06-24T00:57:53+00:00 app[web.1]:          app janky
2012-06-24T00:57:53+00:00 app[web.1]:       method POST
2012-06-24T00:57:53+00:00 app[web.1]:   user_agent     
2012-06-24T00:57:53+00:00 app[web.1]:       params {"nwo"=>"foo/bar.com", "{}"=>nil}
2012-06-24T00:57:53+00:00 app[web.1]:      session   {}
2012-06-24T00:57:53+00:00 app[web.1]:     referrer     
2012-06-24T00:57:53+00:00 app[web.1]:    remote_ip 75.101.205.73
2012-06-24T00:57:53+00:00 app[web.1]:          url http://ci.foo.com/_hubot/setup?nwo=foo/bar.com
2012-06-24T00:57:53+00:00 app[web.1]:   server_url #<URI::HTTP:0x00000003721818 URL:http://jenkins.foo.com/>
2012-06-24T00:57:53+00:00 app[web.1]: callback_url #<URI::HTTP:0x000000036f0b78 URL:http://ci.foo.com/_builder>
2012-06-24T00:57:53+00:00 app[web.1]:      adapter Janky::JobCreator::HTTP
2012-06-24T00:57:53+00:00 app[web.1]:       config "<?xml version='1.0' encoding='UTF-8'?>\n<project>\n  <actions/>\n  <name>ed4776884914e6b64fcedb70fc08b961</name>\n  <logRotator>\n    <daysToKeep>-1</daysToKeep>\n    <numToKeep>-1</numToKeep>\n    <artifactDaysToKeep>-1</artifactDaysToKeep>\n    <artifactNumToKeep>-1</artifactNumToKeep>\n  </logRotator>\n  <keepDependencies>false</keepDependencies>\n  <properties>\n    <hudson.model.ParametersDefinitionProperty>\n      <parameterDefinitions>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_SHA1</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_ID</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n      </parameterDefinitions>\n    </hudson.model.ParametersDefinitionProperty>\n    <com.tikal.hudson.plugins.notification.HudsonN
2012-06-24T00:57:53+00:00 app[web.1]: otificationProperty>\n      <endpoints>\n        <com.tikal.hudson.plugins.notification.Endpoint>\n          <protocol>HTTP</protocol>\n          <url>http://ci.foo.com/_builder</url>\n        </com.tikal.hudson.plugins.notification.Endpoint>\n      </endpoints>\n    </com.tikal.hudson.plugins.notification.HudsonNotificationProperty>\n  </properties>\n  <scm class=\"hudson.scm.NullSCM\"/>\n  <assignedNode>master</assignedNode>\n  <canRoam>false</canRoam>\n  <disabled>false</disabled>\n  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n  <triggers class=\"vector\"/>\n  <concurrentBuild>false</concurrentBuild>\n  <builders>\n    <hudson.tasks.Shell>\n      <command>\nif [ ! -d &quot;./.git&quot; ]; then\n  git init\n  git remote add origin [email protected]:foo/bar.com\nfi\ngit fetch -q origin\ngit reset -q --hard $JANKY_SHA1\nif [ -f script/cibuild ]; then\n  script/cibuild\nelse\n  bun
2012-06-24T00:57:53+00:00 app[web.1]: dle install --path vendor/gems --binstubs\n  bundle exec rake\nfi</command>\n    </hudson.tasks.Shell>\n  </builders>\n  <publishers/>\n  <buildWrappers/>\n</project>\n"
2012-06-24T00:57:53+00:00 app[web.1]:         name "ed4776884914e6b64fcedb70fc08b961"
2012-06-24T00:57:53+00:00 app[web.1]:         repo "[email protected]:foo/bar.com"
2012-06-24T00:57:53+00:00 app[web.1]: response_code "404"
2012-06-24T00:57:53+00:00 app[web.1]: response_body "{\"message\":\"Not Found\"}"
2012-06-24T00:57:53+00:00 app[web.1]: 
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/github.rb:69:in `hook_create'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:125:in `setup_hook'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:117:in `setup'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:36:in `setup'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `block in compile!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
2012-06-24T00:57:53+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST ci.foo.com/_hubot/setup dyno=web.1 queue= wait= service= status=503 bytes=
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/auth/basic.rb:25:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/exception.rb:44:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'2012-06-24T00:57:53+00:00 app[web.1]: ERROR: Janky::Error - Failed to create hook
2012-06-24T00:57:53+00:00 app[web.1]:          app janky
2012-06-24T00:57:53+00:00 app[web.1]:       method POST
2012-06-24T00:57:53+00:00 app[web.1]:   user_agent     
2012-06-24T00:57:53+00:00 app[web.1]:       params {"nwo"=>"foo/bar.com", "{}"=>nil}
2012-06-24T00:57:53+00:00 app[web.1]:      session   {}
2012-06-24T00:57:53+00:00 app[web.1]:     referrer     
2012-06-24T00:57:53+00:00 app[web.1]:    remote_ip 75.101.205.73
2012-06-24T00:57:53+00:00 app[web.1]:          url http://ci.foo.com/_hubot/setup?nwo=foo/bar.com
2012-06-24T00:57:53+00:00 app[web.1]:   server_url #<URI::HTTP:0x00000003721818 URL:http://jenkins.foo.com/>
2012-06-24T00:57:53+00:00 app[web.1]: callback_url #<URI::HTTP:0x000000036f0b78 URL:http://ci.foo.com/_builder>
2012-06-24T00:57:53+00:00 app[web.1]:      adapter Janky::JobCreator::HTTP
2012-06-24T00:57:53+00:00 app[web.1]:       config "<?xml version='1.0' encoding='UTF-8'?>\n<project>\n  <actions/>\n  <name>ed4776884914e6b64fcedb70fc08b961</name>\n  <logRotator>\n    <daysToKeep>-1</daysToKeep>\n    <numToKeep>-1</numToKeep>\n    <artifactDaysToKeep>-1</artifactDaysToKeep>\n    <artifactNumToKeep>-1</artifactNumToKeep>\n  </logRotator>\n  <keepDependencies>false</keepDependencies>\n  <properties>\n    <hudson.model.ParametersDefinitionProperty>\n      <parameterDefinitions>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_SHA1</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_ID</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n      </parameterDefinitions>\n    </hudson.model.ParametersDefinitionProperty>\n    <com.tikal.hudson.plugins.notification.HudsonN
2012-06-24T00:57:53+00:00 app[web.1]: otificationProperty>\n      <endpoints>\n        <com.tikal.hudson.plugins.notification.Endpoint>\n          <protocol>HTTP</protocol>\n          <url>http://ci.foo.com/_builder</url>\n        </com.tikal.hudson.plugins.notification.Endpoint>\n      </endpoints>\n    </com.tikal.hudson.plugins.notification.HudsonNotificationProperty>\n  </properties>\n  <scm class=\"hudson.scm.NullSCM\"/>\n  <assignedNode>master</assignedNode>\n  <canRoam>false</canRoam>\n  <disabled>false</disabled>\n  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n  <triggers class=\"vector\"/>\n  <concurrentBuild>false</concurrentBuild>\n  <builders>\n    <hudson.tasks.Shell>\n      <command>\nif [ ! -d &quot;./.git&quot; ]; then\n  git init\n  git remote add origin [email protected]:foo/bar.com\nfi\ngit fetch -q origin\ngit reset -q --hard $JANKY_SHA1\nif [ -f script/cibuild ]; then\n  script/cibuild\nelse\n  bun
2012-06-24T00:57:53+00:00 app[web.1]: dle install --path vendor/gems --binstubs\n  bundle exec rake\nfi</command>\n    </hudson.tasks.Shell>\n  </builders>\n  <publishers/>\n  <buildWrappers/>\n</project>\n"
2012-06-24T00:57:53+00:00 app[web.1]:         name "ed4776884914e6b64fcedb70fc08b961"
2012-06-24T00:57:53+00:00 app[web.1]:         repo "[email protected]:foo/bar.com"
2012-06-24T00:57:53+00:00 app[web.1]: response_code "404"
2012-06-24T00:57:53+00:00 app[web.1]: response_body "{\"message\":\"Not Found\"}"
2012-06-24T00:57:53+00:00 app[web.1]: 
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/github.rb:69:in `hook_create'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:125:in `setup_hook'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:117:in `setup'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/repository.rb:36:in `setup'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `block in compile!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
2012-06-24T00:57:53+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST ci.foo.com/_hubot/setup dyno=web.1 queue= wait= service= status=503 bytes=
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/auth/basic.rb:25:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-1f9744fc5d35/lib/janky/exception.rb:44:in `call'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-06-24T00:57:53+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'

can't help you right now.

I have janky and hubot deployed to heroku with hipchat. I am sure I must have the configs incorrect, but right now:

  • Hubot shows up in hipchat
  • "ci - show usage" shows up in hipchat as an options when I try hubot help in hipchat
  • when I try hubot ci? I get "can't help you right now."

Janky heroku config (abridged):

JANKY_BASE_URL:           http://profitably-janky.herokuapp.com/
JANKY_BUILDER_DEFAULT:  http://janky:[redacted]@jenkins.activecell.com/
JANKY_CHAT:               hipchat
JANKY_CHAT_DEFAULT_ROOM:  26374
JANKY_CHAT_HIPCHAT_TOKEN: [redacted]
JANKY_CONFIG_DIR:         /app/config
JANKY_GITHUB_HOOK_SECRET: secret
JANKY_GITHUB_PASSWORD:    [redacted]
JANKY_GITHUB_USER:        profitably-janky
JANKY_HUBOT_PASSWORD:     hubot
JANKY_HUBOT_USER:         [email protected]

Hubot heroku config:

HEROKU_URL             => http://profitably-hubot.herokuapp.com
HUBOT_HIPCHAT_JID      => [email protected]
HUBOT_HIPCHAT_NAME     => Hubot McBotson
HUBOT_HIPCHAT_PASSWORD => [redacted]
HUBOT_JANKY_URL        => http://12111_129575:[redacted]@profitably-janky.herokuapp.com/_hubot

I'm sure it's something simple I'm missing here. Any thoughts? Thanks so much!

"Failed to get hook" error when setting up a new repo for building

ERROR: Janky::Error - Failed to get hook
2012-03-30T21:05:54+00:00 app[web.1]: method POST
2012-03-30T21:05:54+00:00 app[web.1]: session {}
2012-03-30T21:05:54+00:00 app[web.1]: user_agent
2012-03-30T21:05:54+00:00 app[web.1]: params {"nwo"=>"TeamSidewinder/videotool", "{}"=>nil}
2012-03-30T21:05:54+00:00 app[web.1]: url http://lnlabs-janky.herokuapp.com/_hubot/setup?nwo=TeamSidewinder/videotool
2012-03-30T21:05:54+00:00 app[web.1]: referrer
2012-03-30T21:05:54+00:00 app[web.1]: remote_ip 216.103.134.250

In response to this command:

rosie ci setup TeamSidewinder/videotool

I'm running Janky 0.9.11

Exception thrown when jenkins posts to /_builder

Somehow the build has a nil url. Any ideas?

ERROR: NoMethodError - undefined method `+' for nil:NilClass
         app janky
      method POST
  user_agent Java/1.6.0_23
      params "{\"parameter\":[{\"name\":\"JANKY_SHA1\",\"value\":\"737b877e\"},{\"name\":\"JANKY_ID\",\"value\":13}]}"
     session   {}
    referrer     
   remote_ip 127.0.0.1
         url http://ci.company.com/_builder
    base_url #<URI::HTTP:0xaacc344 URL:http://localhost:8080/>
       build #<Janky::Build id: 13, green: false, url: nil, compare: "https://github.com/company/repo/compar...", started_at: "2012-06-13 02:51:08", completed_at: nil, commit_id: 2, branch_id: 1, created_at: "2012-06-13 02:51:03", updated_at: "2012-06-13 02:51:08", output: nil, room_id: 494049>
     adapter #<Janky::Builder::HTTP:0xb0daf88 @username=nil, @password=nil>
  create_url #<URI::HTTP:0xb0b9e14 URL:http://localhost:8080/job/818b5a544998ebee78592280c9f1de16/build>

/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/builder/runner.rb:28:in `output_url'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/builder/runner.rb:17:in `output'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/builder/client.rb:30:in `output'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build.rb:127:in `output_remote'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build.rb:163:in `complete'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build.rb:28:in `complete'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/builder/receiver.rb:11:in `call'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/janky-0.9.11/lib/janky/exception.rb:44:in `call'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
/var/lib/janky/vendor/gems/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>'
/var/lib/janky/vendor/gems/ruby/1.9.1/bin/thin:23:in `load'
/var/lib/janky/vendor/gems/ruby/1.9.1/bin/thin:23:in `<main>'
!! Unexpected error while processing request: undefined method `+' for nil:NilClass

Enabling authentication - infinite OAuth Redirect Loop

I'm sure I'm missing something obvious here, but I'm seeing a redirect loop when I enable organizational security for my Janky install.

Per the docs

To restrict access to members of a GitHub organization, register a new OAuth application on GitHub with the callback set to $JANKY_BASE_URL/auth/github/callback then set a few extra settings:

JANKY_SESSION_SECRET: Random session cookie secret. Typically generated by a tool like pwgen.
JANKY_AUTH_CLIENT_ID: The client ID of the OAuth application.
JANKY_AUTH_CLIENT_SECRET: The client secret of the OAuth application.
JANKY_AUTH_ORGANIZATION: The organization name. Example: "github".

So I register the OAuth app for my org, and plug in the the JANKY_AUTH_CLIENT_ID and JANKY_AUTH_CLIENT_SECRET for the app. JANKY_AUTH_ORGANIZATION is of course my org name (EastPoint) in this case. I randomly generate 16 characters for JANKY_SESSION_SECRET.

If I try to hit the url of my Janky install, it looks like it's working. The app immediately redirects to

https://github.com/login/oauth/authorize?response_type=code&client_id=JANKY_AUTH_CLIENT_ID&scope=repo&redirect_uri=https%3A%2F%2FMY.JANKY.SITE%2Fauth%2Fgithub%2Fcallback

I click Allow to authorize and the OAuth flow continues with a 302 to

https://MY.JANKY.SITE/auth/github/callback?code=THECODE

When the request goes to my server, I have one rack.session and I'm assigned a new one, and a 302 is sent which redirects me to the root of the site

https://MY.JANKY.SITE/

At this point, a request is sent back to https://github.com/login/oauth/authorize? and it loops. As far as I can tell, it would appear that Janky is either unable to lookup THECODE passed back from Github, or is having some sort of issue properly managing / associating the given rack.session with the OAuth flow that just occurred.

There's nothing in the logs (is there a way to turn on something more verbose?)

Is there some system-level dependency that I might be missing that could be preventing the calls back to GitHub by the Janky server from succeeding?

Some notes about my environment, for completeness - everything here checks out:

  • Not running on Heroku - running on EC2 - Ubuntu 12.04.1 LTS - have the following packages installed - sudo apt-get -y install curl ssh git-core git build-essential zlib1g zlib1g-dev libyaml-dev libxml2-dev libc6-dev autoconf automake libtool make postgresql postgresql-client postgresql-contrib libpq-dev ruby1.9.3 ruby1.9.1-dev rubygems1.9.1 ruby-bundler, and I've also done an install rubygems-update
  • Ruby 1.9.3 (yes, I have made sure that default Ruby is not 1.8 -- see here)
  • Postgres 9.1 -- I can connect to and see the relevant tables in the database that I've called janky_production - I've tested my connection configuration in irb and it's fine.
  • Running under Upstart - using Foreman to generate the Upstart scripts - RAILS_ENV and RACK_ENV are both set to production
  • I created an authorization for my JANKY_GITHUB_USER and have configured JANKY_GITHUB_STATUS_TOKEN with the token
  • JANKY_SESSION_SECRET is a randomly generated 16 character string from pwgen per the docs suggestion. Similarly JANKY_GITHUB_HOOK_SECRET has been generated in the same manner.
  • Hubot is configured properly with hubot-scripts and a HUBOT_JANKY_URL. I can verify in HipChat that his part is working. I can issue Hubot commands like ci? and the Janky result is properly parsed from https://MY.JANKY.SITE/_hubot/help as an example. However, if I issue a command like ci setup github/janky janky I get the response Error F7U12: Can't Setup.
  • The Url configured for JANKY_BUILDER_DEFAULT is using basic auth over HTTPS. This same basic url we've configured as a WebHook Url under the Service Hooks for the GitHub repo. The webhook is using the Jenkins token style like https://JANKY_GITHUB_USER:[email protected]/github-webhook/. The JANKY_BUILDER_DEFAULT looks identical, except that it doesn't have the github-webhook/ part.
  • I can see the user count increase for the GitHub application assigned to JANKY_AUTH_CLIENT_ID, and I can see the application listed as approved under my user account -- so I know that GitHub side has properly handled the OAuth request from Janky ... it's just that Janky seems to be missing something.

I've double and triple checked all my environment variables to make sure they match up, but it's possible I've done something stupid here.

On the double-checking front, I've also discovered an undocumented JANKY_AUTH_TEAM_ID at https://github.com/github/janky/blob/master/lib/janky.rb#L155 I have configured this to the integer id for the Developers team of my organization, and I am a member. I will add a new issue for updating the docs with a description of this.

A couple other last gory, related details -- again, only mentioned for completeness really.

  • I am running two other apps hosted on EC2 that have GitHub OAuth enabled - Jenkins and ErrBit. Both of these apps work totally fine, so I'm familiar with the process of setting up OAuth. All of our users are automatically logged into these apps if they are logged into GitHub.
  • Technically speaking, at the network infrastructure level, these apps (Jenkins, Errbit and Janky) are running behind a reverse proxy setup. NGinx performs SSL termination, then forwards the request to HAProxy, which reverse proxies based on host header and forwards the request to an internal server -- so directly at the Janky instances listening thin app, default port 5000. I hesitated to mention this, because I don't want to confuse the issue here, as we do have the proxy_set_header configurations in place. I mention this only because maybe, just maybe, there's something different going on in the headers (than all the other apps we reverse proxy that work fine). This piece of setup in nginx.conf has worked fine for years --
location / {
                #proxy to haproxy
                proxy_pass              http://localhost:80;
                proxy_set_header        Host $host;
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto https;

                proxy_redirect          off;
        }

I think that covers it... lots of detail here -- hopefully someone can point me to what I'm missing!

Janky Front-end doesn't have build info

I want to draw attention to #66, which was closed, but isn't resolved. Hopefully more eyes will make it easier to solve. Please comment over there, but the gist of it is this:

The Janky front end never shows any build information. It might have something to do with the fact that started_at is never set on Build objects (and, thus, rows in the DB). Many other fields are also all nil all the time. Hubot, thus, never reports on results as well.

Please comment on #66

(If you're an admin on this repo, please mark this closed and reopen #66, even? It would rock my world.)

Get rid of chat_services to use Hubot

Hi,

Recent versions of Hubot include an http router. It would be nice to use it to notify builds events.

Less code, less duplication and all hubot adapters will benefit from this improvement.

What do you think?

Missing builds for the same commit

When the same commit is pushed to a different branch and commit was previously green, a new build for the new branch is not created.

I would expect a build notice in campfire and a green build on the web showing that something happened.

Could the build be a duplicate of the existing build, just pointing to the other branch?

Janky on non-Heroku

The installation instructions appear to be for Heroku. How hard would it be to install in another environment, say EC2 or my own server?

"Failed to create hook" Exception

2011-12-23T22:28:50+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST simple-stream-7761.herokuapp.com/_hubot/setup dyno=web.1 queue= wait= service= status=503 bytes=
2011-12-23T22:28:50+00:00 app[web.1]: ERROR: Janky::Error - Failed to create hook
2011-12-23T22:28:50+00:00 app[web.1]:          app janky
2011-12-23T22:28:50+00:00 app[web.1]:       method POST
2011-12-23T22:28:50+00:00 app[web.1]:   user_agent     
2011-12-23T22:28:50+00:00 app[web.1]:       params {"nwo"=>"veevachi/api", "{}"=>nil}
2011-12-23T22:28:50+00:00 app[web.1]:      session   {}
2011-12-23T22:28:50+00:00 app[web.1]:     referrer     
2011-12-23T22:28:50+00:00 app[web.1]:    remote_ip 50.16.26.166
2011-12-23T22:28:50+00:00 app[web.1]:   server_url #<URI::HTTP:0x00000003771ae8 URL:http://ci.veevachi.net/>
2011-12-23T22:28:50+00:00 app[web.1]: callback_url #<URI::HTTP:0x00000003771700 URL:http://simple-stream-7761.herokuapp.com/_builder>
2011-12-23T22:28:50+00:00 app[web.1]:       config "<?xml version='1.0' encoding='UTF-8'?>\n<project>\n  <actions/>\n  <name>430e2855fcb6aab5ed03eceff55916bd</name>\n  <logRotator>\n    <daysToKeep>-1</daysToKeep>\n    <numToKeep>-1</numToKeep>\n    <artifactDaysToKeep>-1</artifactDaysToKeep>\n    <artifactNumToKeep>-1</artifactNumToKeep>\n  </logRotator>\n  <keepDependencies>false</keepDependencies>\n  <properties>\n    <hudson.model.ParametersDefinitionProperty>\n      <parameterDefinitions>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_SHA1</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n        <hudson.model.StringParameterDefinition>\n          <name>JANKY_ID</name>\n          <description></description>\n          <defaultValue></defaultValue>\n        </hudson.model.StringParameterDefinition>\n      </parameterDefinitions>\n    </hudson.model.ParametersDefinitionProperty>\n    <com.tikal.hudson.plugins.notification.HudsonN
2011-12-23T22:28:50+00:00 app[web.1]:          url http://simple-stream-7761.herokuapp.com/_hubot/setup?nwo=veevachi/api
2011-12-23T22:28:50+00:00 app[web.1]:      adapter Janky::JobCreator::HTTP
2011-12-23T22:28:50+00:00 app[web.1]: otificationProperty>\n      <endpoints>\n        <com.tikal.hudson.plugins.notification.Endpoint>\n          <protocol>HTTP</protocol>\n          <url>http://simple-stream-7761.herokuapp.com/_builder</url>\n        </com.tikal.hudson.plugins.notification.Endpoint>\n      </endpoints>\n    </com.tikal.hudson.plugins.notification.HudsonNotificationProperty>\n  </properties>\n  <scm class=\"hudson.scm.NullSCM\"/>\n  <assignedNode>master</assignedNode>\n  <canRoam>false</canRoam>\n  <disabled>false</disabled>\n  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n  <triggers class=\"vector\"/>\n  <concurrentBuild>false</concurrentBuild>\n  <builders>\n    <hudson.tasks.Shell>\n      <command>\nif [ ! -d &quot;./.git&quot; ]; then\n  git init\n  git remote add origin [email protected]:veevachi/api\nfi\ngit fetch -q origin\ngit reset -q --hard $JANKY_SHA1\nif [ -f script/cibuild ]; then\n  script/cibuild\nelse\n  bundle in
2011-12-23T22:28:50+00:00 app[web.1]: stall --path vendor/gems --binstubs\n  bundle exec rake\nfi</command>\n    </hudson.tasks.Shell>\n  </builders>\n  <publishers/>\n  <buildWrappers/>\n</project>\n"
2011-12-23T22:28:50+00:00 app[web.1]:         name "430e2855fcb6aab5ed03eceff55916bd"
2011-12-23T22:28:50+00:00 app[web.1]:         repo "[email protected]:veevachi/api"
2011-12-23T22:28:50+00:00 app[web.1]: response_code "404"
2011-12-23T22:28:50+00:00 app[web.1]: 
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/github.rb:55:in `hook_create'
2011-12-23T22:28:50+00:00 app[web.1]: response_body "{\"message\":\"Not Found\"}"
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:125:in `setup_hook'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:117:in `setup'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/repository.rb:36:in `setup'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-9ba5f5057462/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
2011-12-23T22:28:50+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/sinatra-1.3.1/lib/sinatra/base.rb:1212:in `call'

This is the error I am getting with no authentication enabled at all on the Jenkins server. I have the Notification Plugin enabled as well. Advice?

Unable to build - Unknown branch "master". Push again

I am unable to build.

When running hubot ci rooms I receive can't predict rooms now.
When running hubot ci set room REPONAME ourRoom I receive you broke everything

It looks like the problem is in /lib/janky/chat_service/hipchat.rb

error in the log:

2012-04-03T23:56:53+00:00 heroku[router]: POST sourceninja-janky.herokuapp.com/_hubot/SourceTrack/master dyno=web.1 queue=0 wait=0ms service=11ms status=404 bytes=35
2012-04-03T23:57:52+00:00 app[web.1]: ERROR: NoMethodError - undefined method `map' for nil:NilClass
2012-04-03T23:57:52+00:00 app[web.1]:          app janky
2012-04-03T23:57:52+00:00 app[web.1]:       method POST
2012-04-03T23:57:52+00:00 app[web.1]:   user_agent     
2012-04-03T23:57:52+00:00 app[web.1]:       params   {}
2012-04-03T23:57:52+00:00 app[web.1]:      session   {}
2012-04-03T23:57:52+00:00 app[web.1]:     referrer     
2012-04-03T23:57:52+00:00 app[web.1]:    remote_ip 207.97.227.253
2012-04-03T23:57:52+00:00 app[web.1]:          url http://sourceninja-janky.herokuapp.com/_github
2012-04-03T23:57:52+00:00 app[web.1]: 
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/hipchat-0.4.1/lib/hipchat.rb:22:in `rooms'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/chat_service/hipchat.rb:21:in `rooms'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/chat_service.rb:81:in `rooms'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/chat_service.rb:54:in `room_id'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/chat_service.rb:34:in `default_room_id'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/repository.rb:109:in `room_id'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/branch.rb:64:in `build_for'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build_request.rb:26:in `handle'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build_request.rb:7:in `block in handle'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build_request.rb:5:in `each'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/build_request.rb:5:in `handle'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/github/receiver.rb:32:in `call!'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/github/receiver.rb:18:in `call'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/janky-0.9.11/lib/janky/exception.rb:44:in `call'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
2012-04-03T23:57:52+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST sourceninja-janky.herokuapp.com/_github dyno=web.1 queue= wait= service= status=503 bytes=
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `load'
2012-04-03T23:57:52+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>'

Allow multiple janky installs per hubot

Firstly, this is technically a feature request for the hubot-script, but seemed more fitting here.

More a placeholder for me to work on later.
https://github.com/github/hubot-scripts/blob/master/src/scripts/janky.coffee

Currently, Janky works awesome if you have one hubot per project (ie. you work at a product company, like github). But if you have one jenkins instance per project, janky doesn't fit your workflow as well.

I plan to put some time into figuring out how a company can have one company-wide hubot, but multiple concurrent projects, each with their own hubot room, jenkins instance, and janky app. Seems like its mostly a matter of storing janky credentials in jankys brain, rather than env vars? Or perhaps just allowing env var suffixes

Builds not getting created.

It seems out post-receive hooks are not triggering a build lately (or inconsistently). The heroku logs say everything is ok and are just simply returning a 201 status code, but jenkins isnt triggering a build. Has something changed in recent versions with this code? Running latest 0.9.9

Expose build artifacts through the web UI

On the GitHub for Mac team, we're planning to use Jenkins to create our Release builds for us, and put them up as build artifacts. That's mostly working (using some settings in the config XML), but it's really inconvenient to have to go to Jenkins and find the correct job hash to access them.

It'd be awesome if Janky exposed the artifacts created by a given build.

UI improvements/changes proposal

Hi,

I've been using Janky and I miss some info and links in the UI and would like to propose some changes which I'd be happy to work on.

Would like to know what you guys think about it before starting.

Add author and sha1 to build list

build list

Change/Add links to build list

build list

Projects dashboard

Not sure on the UI of this one yet but I was thinking about a `/dashboard' page that would list the projects and its master branch build status. Something in the lines of the build list but with a project per row.

Maybe with a list of other branches in a tag list style colored according to the build status of each one (but keeping the main status of the row determined by the master branch).

What do you guys think?

Cheers!

db:migrate fails with hipchat configured

Following the instructions to enable hipchat and i get the following message back from heroku when i try run a db:migrate:

Unknown chat service: "hipchat". Available services are campfire

my config.ru looks like :

require "janky"
require "janky/chat_service/hipchat"
Janky.setup(ENV)
run Janky.app

and the heroku config looks like (secret values removed) :

DATABASE_URL             => postgres://[email protected]/xxx
GEM_PATH                 => vendor/bundle/ruby/1.9.1
JANKY_BASE_URL           => http://clue-janky.herokuapp.com/
JANKY_BUILDER_DEFAULT    => http://[email protected]/
JANKY_CHAT               => hipchat
JANKY_CHAT_DEFAULT_ROOM  => xxx
JANKY_CHAT_HIPCHAT_TOKEN => xxx
JANKY_CONFIG_DIR         => /app/config
JANKY_GITHUB_HOOK_SECRET => xxx
JANKY_GITHUB_PASSWORD    => xxx
JANKY_GITHUB_USER        => clue-janky
JANKY_HUBOT_PASSWORD     => xxx
JANKY_HUBOT_USER         => hubot
LANG                     => en_US.UTF-8
PATH                     => bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
RACK_ENV                 => production
SHARED_DATABASE_URL      => postgres://[email protected]/xxx

Any ideas ?

Thanks and regards,
Andre

Purpose of JANKY_GITHUB_HOOK_SECRET

I think that this serves the same purpose as JANKY_SESSION_SECRET

It would appear that this secret is sent from Janky to GitHub when a new hook is created.

http://developer.github.com/v3/repos/hooks/

I just want to make sure that this is supposed to be something random generated by pwgen.

I'll update the docs if that's the case to make it more clear.

Thanks

Does Not Queue Job for Build

No error in janky logs, nor apache logs, nor jenkins logs. hubot ci setup organization/project works. Pushing sets up POST to _github, but, does not queue job for build.

Build fails locally

I ran all the bootstrap stuff locally, and still got this for bin/rake many times over:

janky statuses ✈ ⚡ › bin/rake
Run options: 

# Running tests:

ERROR: Janky::Error - no config.xml.erb template for repo 1
         app janky
      method POST
  user_agent     
      params {"nwo"=>"github/github", "name"=>nil}
     session   {}
    referrer     
   remote_ip     
         url http://example.org/_hubot/setup

/Users/rsanheim/src/github/janky/lib/janky/repository.rb:172:in `job_config_path'
/Users/rsanheim/src/github/janky/lib/janky/repository.rb:190:in `job_name'
/Users/rsanheim/src/github/janky/lib/janky/repository.rb:156:in `setup_job'
/Users/rsanheim/src/github/janky/lib/janky/repository.rb:137:in `setup'
/Users/rsanheim/src/github/janky/lib/janky/repository.rb:36:in `setup'
/Users/rsanheim/src/github/janky/lib/janky/hubot.rb:15:in `block in <class:Hubot>'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:1265:in `block in compile!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `[]'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (3 levels) in route!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:851:in `route_eval'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:835:in `block (2 levels) in route!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:872:in `block in process_route'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `catch'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:870:in `process_route'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:834:in `block in route!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `each'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:833:in `route!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:936:in `dispatch!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `block in call!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `block in invoke'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `catch'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:921:in `invoke'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:769:in `call!'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:755:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/nulllogger.rb:9:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:99:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `block in call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:1471:in `synchronize'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/sinatra-1.3.3/lib/sinatra/base.rb:1389:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/auth/basic.rb:25:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/Users/rsanheim/src/github/janky/lib/janky/exception.rb:44:in `call'
/Users/rsanheim/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.4.1/lib/rack/mock.rb:72:in `request'
/Users/rsanheim/src/github/janky/test/test_helper.rb:121:in `hubot_request'
/Users/rsanheim/src/github/janky/test/test_helper.rb:83:in `hubot_setup'
/Users/rsanheim/src/github/janky/test/janky_test.rb:14:in `setup'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:947:in `run'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit/testcase.rb:17:in `run'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:787:in `block in _run_suite'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:780:in `map'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:780:in `_run_suite'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:565:in `block in _run_suites'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `each'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:563:in `_run_suites'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:746:in `_run_anything'
/Users/rsanheim/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:909:in `run_tests'

Support for multiple jobs per repo

Is there any support for creating multiple jobs per repo and branch? We have Jenkins setup to build our app in one job and then run other tests as separate jobs in a pipeline style configuration, so when a user calls setup for a repo we need to actually create multiple jobs on jenkins

Jenkins configuration for README

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'
....

301 Redirect

Janky does not follow redirects when getting build output. The response code, when forcing HTTPS, is 301 from the Jenkins server.

Broach Authentication Error

Seems that Broach is not picking up the right settings.

JANKY_CHAT_CAMPFIRE_ACCOUNT => my_account_name
JANKY_CHAT_CAMPFIRE_TOKEN   => hex
JANKY_CHAT_DEFAULT_ROOM     => The Room
2012-02-10T22:43:11+00:00 app[web.1]: ERROR: Broach::AuthenticationError - Couldn't authenticate with the supplied credentials for the account `account'
2012-02-10T22:43:11+00:00 app[web.1]:          app janky
2012-02-10T22:43:11+00:00 app[web.1]:       method POST
2012-02-10T22:43:11+00:00 app[web.1]:   user_agent     
2012-02-10T22:43:11+00:00 app[web.1]:       params   {}
2012-02-10T22:43:11+00:00 app[web.1]:     referrer     
2012-02-10T22:43:11+00:00 app[web.1]:    remote_ip 50.57.128.197
2012-02-10T22:43:11+00:00 app[web.1]:      session   {}
2012-02-10T22:43:11+00:00 app[web.1]: 
2012-02-10T22:43:11+00:00 app[web.1]:          url http://danky.herokuapp.com/_github
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/broach-0.2.1/lib/broach/session.rb:44:in `get'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/chat_service.rb:81:in `rooms'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/broach-0.2.1/lib/broach/room.rb:66:in `all'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/chat_service/campfire.rb:27:in `rooms'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/broach-0.2.1/lib/broach.rb:64:in `rooms'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/chat_service.rb:34:in `default_room_id'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/repository.rb:109:in `room_id'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/chat_service.rb:54:in `room_id'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/branch.rb:64:in `build_for'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/broach-0.2.1/lib/broach/session.rb:72:in `handle_response'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/build_request.rb:5:in `each'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/build_request.rb:26:in `handle'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/build_request.rb:7:in `block in handle'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/github/receiver.rb:18:in `call'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems

2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/github/receiver.rb:32:in `call!'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/bundler/gems/janky-43b45535c9fa/lib/janky/exception.rb:44:in `call'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
2012-02-10T22:43:11+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
2012-02-10T22:43:11+00:00 heroku[router]: Error H13 (Connection closed without response) -> POST danky.herokuapp.com/_github dyno=web.1 queue= wait= service= status=503 bytes=

Would like pretty formatted view of build output

Janky currently just shows the stdout/stderr from a build. It would be awesome if it were possible to parse this output and construct a formatted view of the build output that made it easy to spot build failures, failing tests, etc.

deploying to heroku from windows not working

Seems to be something with the rake file... janky and its documentation have also been rather frusterating compared to installing Hubbot

Stephen@ASUS-7 ~/Dropbox/git/home/janky (master)
$ heroku run rake db:migrate
autoupdating
Running rake db:migrate attached to terminal... up, run.1
Support for Ruby versions lesser than 1.9.3 is deprecated and will be removed in Janky 1.0.
rake aborted!
C:/Users/Stephen/Dropbox/git/app/config is not a directory

(See full trace by running task with --trace)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.