Skip to content

Instantly share code, notes, and snippets.

@AstmDesign
Forked from jean182/bitbucket-pipelines.yml
Created December 9, 2019 12:40
Show Gist options
  • Select an option

  • Save AstmDesign/f3e3bc5c10fd6b65a6f14ceb21c230dd to your computer and use it in GitHub Desktop.

Select an option

Save AstmDesign/f3e3bc5c10fd6b65a6f14ceb21c230dd to your computer and use it in GitHub Desktop.

Revisions

  1. @jean182 jean182 created this gist Dec 18, 2018.
    49 changes: 49 additions & 0 deletions bitbucket-pipelines.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,49 @@
    image: starefossen/ruby-node:2-5

    pipelines:
    branches:
    master:
    - step:
    script:
    - export HEROKU_APP_NAME=ci-conceptual
    - chmod +x deploy-scripts/package_and_deploy.sh deploy-scripts/migrate.sh deploy-scripts/restart.sh
    - deploy-scripts/package_and_deploy.sh
    - deploy-scripts/migrate.sh
    - deploy-scripts/restart.sh
    staging:
    - step:
    script:
    - export HEROKU_APP_NAME=ci-conceptual-staging
    - chmod +x deploy-scripts/package_and_deploy.sh deploy-scripts/migrate.sh deploy-scripts/restart.sh
    - deploy-scripts/package_and_deploy.sh
    - deploy-scripts/migrate.sh
    - deploy-scripts/restart.sh
    develop:
    - step:
    script:
    - export HEROKU_APP_NAME=ci-conceptual-development
    - chmod +x deploy-scripts/package_and_deploy.sh deploy-scripts/migrate.sh deploy-scripts/restart.sh
    - deploy-scripts/package_and_deploy.sh
    - deploy-scripts/migrate.sh
    - deploy-scripts/restart.sh
    default:
    - step:
    script:
    - export DATABASE_URL=postgresql://test_user:test_user_password@localhost/pipelines
    - apt-get update
    - gem update bundler
    - bundle install
    - bundle exec rake db:setup db:migrate --trace RAILS_ENV=test
    - bundle exec rspec
    - rubocop
    services:
    - postgres

    definitions:
    services:
    postgres:
    image: postgres
    environment:
    POSTGRES_DB: ci_conceptual_test
    POSTGRES_USER: test_user
    POSTGRES_PASSWORD: test_user_password