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:pass@jenkins.example.com/.
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.

Hubot

Install the janky script in your Hubot
then set the HUBOT_JANKY_URL environment variable. Example:
http://user:password@janky.example.com/_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.

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.