CodeBuild

A fully-managed build pipeline to create temporary server to build and test code projects

  • A fully managed build service in the cloud.
  • Compiles your source code, runs unit tests, and produces artifacts that are ready to deploy.
  • Eliminates the need to provision, manage, and scale your own build servers.
  • Provides prepackaged build environments for popular programming languages and build tools such as Apache Maven, Gradle, and more.
  • You can also customize build environments to use your own build tools.
  • Scales automatically to meet peak build requests.

Buildspec

version: 0.2
phases:
  install:
    command:
      - bundle install
  pre_build:
    commands:
      - service postgresql start
      - export DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
      - export RAILS_ENV=test
  build:
    commands:
      - bundle exec rake db:create
      - bundle exec rake db:schema:load
      - bundle exec rake db:migrate
  post_build:
    commands:
      - bundle exec rspec
      - bundle exec cucumber