syncing master
This commit is contained in:
109
circle.yml
109
circle.yml
@@ -1,58 +1,51 @@
|
||||
machine:
|
||||
python:
|
||||
version: 3.5.1
|
||||
node:
|
||||
version: 6.1.0
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- pip install invoke
|
||||
override:
|
||||
- invoke install
|
||||
- invoke update_version
|
||||
|
||||
database:
|
||||
override:
|
||||
- createdb test
|
||||
- createdb pivotal
|
||||
- echo "CREATE ROLE pivotal WITH UNENCRYPTED PASSWORD 'password';" | psql -U postgres
|
||||
- echo "ALTER ROLE pivotal WITH LOGIN;" | psql -U postgres
|
||||
- echo "GRANT SELECT, UPDATE, INSERT ON ALL TABLES IN SCHEMA test.public TO pivotal;" | psql -U postgres
|
||||
- echo "GRANT CREATE, CONNECT ON DATABASE test TO pivotal;" | psql -U postgres
|
||||
- echo "GRANT SELECT, UPDATE, INSERT ON ALL TABLES IN SCHEMA pivotal.public TO pivotal;" | psql -U postgres
|
||||
- echo "GRANT CREATE, CONNECT ON DATABASE pivotal TO pivotal;" | psql -U postgres
|
||||
- PYTHONPATH=.:$PYTHONPATH alembic upgrade head
|
||||
|
||||
test:
|
||||
override:
|
||||
- invoke test_ci
|
||||
|
||||
deployment:
|
||||
staging:
|
||||
branch: master
|
||||
commands:
|
||||
- invoke update_heroku_version staging
|
||||
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
- git push -f git@heroku.com:sp-helix-staging.git $CIRCLE_SHA1:refs/heads/master
|
||||
- heroku run --app sp-helix-staging invoke db_migrate
|
||||
- rake ci:deliver
|
||||
preprod:
|
||||
branch: preprod
|
||||
commands:
|
||||
- invoke update_heroku_version preprod
|
||||
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
- git push -f git@heroku.com:sp-helix-preprod.git $CIRCLE_SHA1:refs/heads/master
|
||||
- heroku run --app sp-helix-preprod invoke db_migrate
|
||||
- rake ci:deliver
|
||||
production:
|
||||
tag: /release-.*/
|
||||
commands:
|
||||
- invoke update_heroku_version production
|
||||
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
- git push -f git@heroku.com:sp-helix-production.git $CIRCLE_SHA1:refs/heads/master
|
||||
- heroku run --app sp-helix-production invoke db_migrate
|
||||
- rake ci:deliver
|
||||
|
||||
notify:
|
||||
webhooks:
|
||||
- url: http://pulse.pivotallabs.com/projects/03ba990f-b8f5-4508-b4c1-19038b2cb791/status
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: ivannnn/heroku_cedar14:2.0
|
||||
environment:
|
||||
PGUSER: pivotal
|
||||
PGPASSWORD: password
|
||||
PASSWORD: password
|
||||
environment:
|
||||
PATH: /usr/local/rvm/gems/ruby-2.3.4/bin:/usr/local/rvm/gems/ruby-2.3.4@global/bin:/usr/local/rvm/rubies/ruby-2.3.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Set up and Run tests
|
||||
command: |
|
||||
source /etc/profile.d/rvm.sh
|
||||
rvm use 2.3.4
|
||||
/etc/init.d/postgresql start
|
||||
python3.4 -m venv env
|
||||
source env/bin/activate
|
||||
pip install invoke
|
||||
invoke install
|
||||
npm install
|
||||
invoke db_migrate
|
||||
invoke test_ci
|
||||
- deploy:
|
||||
name: staging
|
||||
command: |
|
||||
invoke update_heroku_version staging
|
||||
"[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
git push -f git@heroku.com:sp-helix-staging.git $CIRCLE_SHA1:refs/heads/master
|
||||
heroku run --app sp-helix-staging invoke db_migrate
|
||||
rake ci:deliver
|
||||
name: preprod
|
||||
command: |
|
||||
invoke update_heroku_version preprod
|
||||
"[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
git push -f git@heroku.com:sp-helix-preprod.git $CIRCLE_SHA1:refs/heads/master
|
||||
heroku run --app sp-helix-preprod invoke db_migrate
|
||||
rake ci:deliver
|
||||
name: production
|
||||
commands: |
|
||||
invoke update_heroku_version production
|
||||
"[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
|
||||
git push -f git@heroku.com:sp-helix-production.git $CIRCLE_SHA1:refs/heads/master
|
||||
heroku run --app sp-helix-production invoke db_migrate
|
||||
rake ci:deliver
|
||||
notify:
|
||||
webhooks:
|
||||
- url: http://pulse.pivotallabs.com/projects/03ba990f-b8f5-4508-b4c1-19038b2cb791/status
|
||||
|
||||
Reference in New Issue
Block a user