layout | title |
---|---|
default |
Configuration |
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 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.
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 are small code parts that can be executed on various project actions. Currently supported actions are:
build_passed(build, config)
— invoked whenbuild
was successfully ranbuild_fixed(build, config)
— invoked whenbuild
fixed the failing projectbuild_still_fails(build, config)
— invoked whenbuild
didn’t fix the projectbuild_finished(build, config)
— invoked for everybuild
ranbuild_failed(build, config)
— invoked whenbuild
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 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"
Set your host for links to work (mandatory in production!)
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.
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.