Setup Codeship for a new Beach Platform Instance

beachapi
codeship
ci
testing

#1

Parent Application

##Create the Project

##Connect the Github Repository

##Setup Test options

###Setup Commands

# We support all major Ruby versions. Please see our docs for a full list
# https://documentation.codeship.com/classic/languages-frameworks/ruby/
rvm use 2.4.1 --install
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
git config --global url.ssh://[email protected]/.insteadOf https://bitbucket.org/
bundle install
export RAILS_ENV=test
sed -i "s|5432|5435|" "config/database.yml"
bundle exec rake db:schema:load

###Test Pipelines
bundle exec rake

Setup Environment

  • Add environment variable for our Github user to be able to access our private repos.

BUNDLE_GITHUB__COM {{your token}}:x-oauth-basic

Enable Machine User

Remove the auto-generated Deploy key from your connected Github account

Go to Codeship > Project > General and grab the SSH Key

Add this SSH key to your Machine User

Check that Machine User has access rights to the repositories

https://documentation.codeship.com/general/projects/access-other-repositories/

Add a badge to repo, commit and push

Codeship Status for beachio/beach-api-core

Engines

Setup Test Options

Setup Commands

rvm use 2.4.1 --install
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
bundle install
export RAILS_ENV=test
bundle exec rake app:db:create
psql -d {{ENGINE_NAME}}_test -p 5432 -c 'create extension if not exists hstore;'
bundle exec rake app:db:migrate
bundle exec rake app:db:test:prepare

Test Pipelines

bundle exec rspec


Useful Info

https://documentation.codeship.com/general/projects/access-other-repositories/