Skip to content

Instantly share code, notes, and snippets.

@suryagaddipati
Created June 26, 2013 21:34
Show Gist options
  • Save suryagaddipati/5871932 to your computer and use it in GitHub Desktop.
Save suryagaddipati/5871932 to your computer and use it in GitHub Desktop.
environment:
# always a hash map
vars:
RBXOPT: -X19 # by default
JRUBY_OPTS: --1.9 # by default
BUNDLE_PATH: tmp/bundle
BUNDLE_FROZEN: true
BUNDLE_WITHOUT: production:development
# always single value
language: ruby
# single value or list of values (extra row in build matrix)
language_versions:
# TODO: specify patch-levels or just try to keep up with latest?
- ree-1.8.7
- mri-1.8.7
- mri-1.9.2
- mri-2.0.0
- jruby-1.7.3: {mode: 1.8, foo: bar} # will call `languages/jruby-1.7.3 --mode 1.8 --foo bar`
- jruby-1.7.3
- rbx-2.0.0-rc1: {mode: 1.8}
- rbx-2.0.0-rc1
# single package name or list containing a mix of package names or
# package specs (`{<package-name>: <option-hash>}`)
packages:
- postgresql
- sphinx: {version: "> 1.0.0"}
build:
# single bash script to determine whether or not this build should be run (yes = 0 exit)
if: [[ ! $DOTCI_BRANCH =~ .*skip_ci.* ]] && [[ ! $DOTCI_BRANCH = gh-pages ]]
# single command or list of commands (run serially on each matrix job)
before_install:
- yum install -fy some-obscure-dependency
# single command or list of commands (run serially on each matrix job)
before:
- gem install -y rubygems-update
- update_rubygems
- gem install bundler
- bundle install
- rake db:create db:schema:load db:migrate db:test:prepare
# single command or list of commands (run serially on each matrix job)
info:
- gem env
- bundle --version
# single command or list of commands (run serially on each matrix job)
# or as a hash map (each entry run in parallel in build matrix)
run:
unit: bundle exec rake spec:units
integration: bundle exec rake spec:integration
acceptance: # Each parallelized step can also have multiple serial commands
- bundle exec rake cucumber
- bundle exec rake cucumber:javascript
# hash map with 'each' and 'all' keys; or, list/value (acts as 'each')
after:
# single command or list of commands (run serially after each matrix job)
each:
- echo "${DOTCI_SCRIPT:-The build} was a ${DOTCI_BUILD_STATUS}"
# single command or list of commands (run serially after all matrix jobs)
all:
- '[ $DOTCI_BRANCH = "master" ] && git tag -f ci-last-successful-master'
- '[ $DOTCI_BRANCH = "master" ] && bundle exec cap uat deploy || true'
- '[ $DOTCI_BRANCH = "production" ] && bundle exec cap staging deploy || true'
# hash map of notification types
notifications:
webhook: # single hash map or list of hash maps
- url: https://example.com # single URL or list of URLs
if: '[ $DOTCI_BRANCH = "master" ]' # defaults to /bin/true
hipchat: # single hash map or list of hash maps
- room: The Coolest Team
plugins:
- test_output: (tap|junit|json)
- corbetura
- findbugs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment