Skip to content

Instantly share code, notes, and snippets.

@8parth
Created December 31, 2018 10:49
Show Gist options
  • Save 8parth/741daf4af67a8caac859f5ea3a8ec596 to your computer and use it in GitHub Desktop.
Save 8parth/741daf4af67a8caac859f5ea3a8ec596 to your computer and use it in GitHub Desktop.
bitbucket pipeline example yml
# This is a sample build configuration for Ruby.
# Check our guides at https://confluence.atlassian.com/x/8r-5Mw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ruby:2.4.1
pipelines:
default:
- step:
deployment: test
caches:
- bundler
script: # Modify the commands below to build your repository.
- export DATABASE_URL=postgresql://postgres:postgres@localhost/db_name
- export RAILS_ENV=test
- export RAKE_ENV=test
- bundle install
- rake db:create
- rake db:migrate
- rspec
services:
- postgres
definitions:
caches:
bundler: ./vendor
services:
postgres:
image: postgres
environment:
POSTGRES_DB: db_name
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postrges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment