Skip to content

Latest commit

 

History

History
84 lines (54 loc) · 4.39 KB

configuration.textile

File metadata and controls

84 lines (54 loc) · 4.39 KB
layout title
default
Configuration

Setting up project

On the homepage, click “New project” on the menu.

  • Name should be a globally unique project name like “My Project master”
  • Vcs type version control software you are using. Git is the only choice for now, but you can contribute with your own VCS handler
  • Vcs source the source to the version control repository. Read the VCS section for info
  • Vcs branch the branch to work on
  • Max builds BigTuna will keep only latest max_builds builds (default: 10)
  • Hooks Connect various hooks to project builder. See hooks section for more information
  • Hook name Set up unique hook name and POST to http://bigtuna.domain/hooks/build/:name to build the app

After creating project you will be redirected to edit page, where you can set up various configurations. For example, you can test your project on different Ruby environments, versions, platforms, etc.

  • Name Name for a new configuration
  • Steps Newline-separated build steps; see the steps section for more details

Please note, that BigTuna uses DelayedJob as a backend. This means that your jobs are ran by an external DelayedJob process. This process is maintained by script/delayed_job file.

RAILS_ENV=production ./script/delayed_job start

Visit Delayed Job’s GitHub page for more information.

Steps

Steps should be newline—separated shell commands which will be executed in order by our builder. Sample Rails 3 step entry might look like this:

bundle install --path=%project_dir%/bundle --deployment
cp /project/shared/database.yml.sample %build_dir%/config/database.yml
bundle exec rake

Please note that %build_dir% and %project_dir% are special variables. If used in a step, they will be replaced with appropriate paths.

When building a web app, ensure your production data is safe. Use separate database.yml config file with only test environment entry as an extra precaution. That way you’ll make sure other databases aren’t accessed during the build process.

Version Control

VCS Source is the path to your repository. It can either be a local path (like /my/git/path) if your repository is locally visible by BigTuna app, or a remote entry (like your.host:repo.git). In both cases it has to be accessible by the user which runs your BigTuna application. A remote entry will probably require a passwordless login, so an id_{r|d}sa.pub key has to be present on the remote site.

Hooks

Hooks are small code parts that can be executed on various project actions. Currently supported actions are:

  • build_passed(build, config) — invoked when build was successfully ran
  • build_fixed(build, config) — invoked when build fixed the failing project
  • build_still_fails(build, config) — invoked when build didn’t fix the project
  • build_finished(build, config) — invoked for every build ran
  • build_failed(build, config) — invoked when build failed a valid project

config in all hooks is a hash of configuration values. You can use it in hook actions to provide custom behaviour based on configuration provided by user.

Currently there is a Mailer hook available, which allows you to send emails to specified recipients.

If you would like to contribute learn how to write your own hook

bigtuna.yml

BigTuna has few configuration options which can be set up in config/bigtuna.yml file.

# config/bigtuna.yml
test:
  read_only: false
  github_secure: "mytoken"
production:
  read_only: true
  url_host: "bigtuna.yourdomain.com"

Host url

Set your host for links to work (mandatory in production!)

Read—only mode

We can work in read—only mode allowing only to view projects and builds. You can enable it by passing BIGTUNA_READONLY=1 env variable while starting server. Also, there is a read_only configuration entry which you can set to boolean value.

The environment variable has a higher priority. By default the read—only option is disabled.

GitHub post—receive hook

You can set up github_secure token for BigTuna. Then in you GitHub project config set up post—receive hook to big.tuna.host/hooks/build/github/:secure and your projects will build automatically based on repository url and branch name. By default this is disabled as token is not set.