Created
June 2, 2017 15:48
-
-
Save toanalien/7aa04656c338cc045b3dc9ef52f39c80 to your computer and use it in GitHub Desktop.
.gitlab-ci.yml master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variables: | |
| POSTGRES_DB: testdb | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: "123456" | |
| REDISCLOUD_URL: "redis://redis:6379/" | |
| stages: | |
| - test | |
| - deploy_static | |
| - deploy | |
| test: | |
| type: test | |
| image: registry.gitlab.com/ten-cua-tui/ten-project-cua-tui | |
| services: | |
| - postgres | |
| - redis | |
| - mongo | |
| script: | |
| - npm install phantomjs-prebuilt | |
| - pip install -r requirements.txt | |
| - pip install -r requirements_dev_test.txt | |
| - py.test . --tb=auto --cov=. | |
| collectstatic: | |
| type: deploy_static | |
| image: image: registry.gitlab.com/ten-cua-tui/ten-project-cua-tui | |
| script: | |
| - pip install -r requirements.txt | |
| - pip install -r requirements_dev_test.txt | |
| - python manage.py collectstatic --noinput | |
| staging: | |
| type: deploy | |
| image: ruby | |
| script: | |
| - gem install dpl | |
| - dpl --provider=heroku --app=ten-app-staging-cua-tui --api-key=$HEROKU_STAGING_API_KEY | |
| only: | |
| - /^staging.*$/ | |
| production: | |
| type: deploy | |
| image: ruby | |
| script: | |
| - gem install dpl | |
| - content=$(curl -L http://cho-mình-hỏi.com/có-cho-deploy-source-code-mới-lên-không) | |
| - if [[ $content == *"false"* ]]; then dpl --provider=heroku --app=ten-app-production-cua-tui --api-key=$HEROKU_PRODUCTION_API_KEY ; fi | |
| only: | |
| - master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment