Files
old-krovovi-kalkulator/circle.yml
2017-11-07 09:23:57 +01:00

59 lines
2.0 KiB
YAML

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