/docs/backend/continuous_integration.md
Markdown | 86 lines | 53 code | 33 blank | 0 comment | 0 complexity | 7a9a64a892d8ebc825097f76a2ae83b8 MD5 | raw file
- # Travis
- TODO
- # Circleci
- TODO
- # Drone.io and Drone
- ## Setting up Hello World with Drone.io Continuous Integration
- Drone.io is a hosting platform that uses the open source drone software.
- To learn more about drone and setting up your personal server to run CI testing visit [Github](https://github.com/drone/drone) and [their docs/forums](http://readme.drone.io/community/overview/). [This](http://linoxide.com/linux-how-to/setup-drone-continuous-integration-linux/) may also be helpful.
- ### Instructions:
- 1. Head to [Drone.io](https://drone.io)
- 2. Sign up for desired plan
- 3. [Login](https://drone.io/login)
- You can login with your hosting service account
- ![Login Screenshot](../img/ci/droneio/screenshots/login-shot.png)
- 4. [Start a new project](https://drone.io/new) and select where to look for your repo
- ![Select Hosting Service for Project](../img/ci/droneio/screenshots/hosting-service-project.png)
- 5. Select ` hello-world-web ` for your repo
- 6. Setup the project by selecting python
- ![Setup Project Screenshot](../img/ci/droneio/screenshots/setup-project.png)
- 7. Setup your Build Script by replacing the text field with the following:
-
- ```
- pip install pip-accel
- pip-accel install ansible
- pip-accel install -r requirements/development.txt
- psql -c "CREATE DATABASE hello_world;" -U postgres
- flake8
- py.test --cov -v --tb=native
- ansible-playbook -i provisioner/hosts provisioner/site.yml --syntax-check
- ```
- 8. Click "Save"
- ![Setup Screenshot](../img/ci/droneio/screenshots/setup-screenshot.png)
- 9. Insure Python version is correct, or change as needed.
- Note: At this time not all versions are available
- 10. Select PostgreSQL
- ![Prebuild Screenshot](../img/ci/droneio/screenshots/prebuild-screenshot.png)
- 11. Click "Build Now"
- Your project will now be built and script will be run when drone.io recognizes activity on this repo
- ### Set up Heroku deployment with Drone.io
- 1. Click ( "Deployment" )[https://drone.io/github.com/karambir/hello-world-web/admin/deployments#/]
- 2. Click "New"
- ![Deploy Screenshot](../img/ci/droneio/screenshots/deploy-screenshot.png)
- 3. Click "Heroku"
- ![Heroku Screenshot](../img/ci/droneio/screenshots/heroku-screenshot.png)
- 4. Add `https://git.heroku.com:hello_world-dev.git` under the Application Git URL
- 5. Add `master` under Branch
- 6. Add the deployment key to Heroku account
- You can do this by showing the deployment key, copying it, going to (Heroku)[https://dashboard.heroku.com/account] and adding it as a registered SSH key
- 7. Click Save
- ![Heroku Save Screenshot](../img/ci/droneio/screenshots/heroku-save-screenshot.png)
- 8. To have deployment for other branches including testing and production repeat steps 3 --> 7 with:
- - hello_world-qa for branch qa
- - hello_world-prod for branch prod
- 9. To change email reception settings click on notifications