PageRenderTime 50ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/backend/continuous_integration.md

https://gitlab.com/karambir/hello-world-web
Markdown | 86 lines | 53 code | 33 blank | 0 comment | 0 complexity | 7a9a64a892d8ebc825097f76a2ae83b8 MD5 | raw file
  1. # Travis
  2. TODO
  3. # Circleci
  4. TODO
  5. # Drone.io and Drone
  6. ## Setting up Hello World with Drone.io Continuous Integration
  7. Drone.io is a hosting platform that uses the open source drone software.
  8. 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.
  9. ### Instructions:
  10. 1. Head to [Drone.io](https://drone.io)
  11. 2. Sign up for desired plan
  12. 3. [Login](https://drone.io/login)
  13. You can login with your hosting service account
  14. ![Login Screenshot](../img/ci/droneio/screenshots/login-shot.png)
  15. 4. [Start a new project](https://drone.io/new) and select where to look for your repo
  16. ![Select Hosting Service for Project](../img/ci/droneio/screenshots/hosting-service-project.png)
  17. 5. Select ` hello-world-web ` for your repo
  18. 6. Setup the project by selecting python
  19. ![Setup Project Screenshot](../img/ci/droneio/screenshots/setup-project.png)
  20. 7. Setup your Build Script by replacing the text field with the following:
  21. ```
  22. pip install pip-accel
  23. pip-accel install ansible
  24. pip-accel install -r requirements/development.txt
  25. psql -c "CREATE DATABASE hello_world;" -U postgres
  26. flake8
  27. py.test --cov -v --tb=native
  28. ansible-playbook -i provisioner/hosts provisioner/site.yml --syntax-check
  29. ```
  30. 8. Click "Save"
  31. ![Setup Screenshot](../img/ci/droneio/screenshots/setup-screenshot.png)
  32. 9. Insure Python version is correct, or change as needed.
  33. Note: At this time not all versions are available
  34. 10. Select PostgreSQL
  35. ![Prebuild Screenshot](../img/ci/droneio/screenshots/prebuild-screenshot.png)
  36. 11. Click "Build Now"
  37. Your project will now be built and script will be run when drone.io recognizes activity on this repo
  38. ### Set up Heroku deployment with Drone.io
  39. 1. Click ( "Deployment" )[https://drone.io/github.com/karambir/hello-world-web/admin/deployments#/]
  40. 2. Click "New"
  41. ![Deploy Screenshot](../img/ci/droneio/screenshots/deploy-screenshot.png)
  42. 3. Click "Heroku"
  43. ![Heroku Screenshot](../img/ci/droneio/screenshots/heroku-screenshot.png)
  44. 4. Add `https://git.heroku.com:hello_world-dev.git` under the Application Git URL
  45. 5. Add `master` under Branch
  46. 6. Add the deployment key to Heroku account
  47. 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
  48. 7. Click Save
  49. ![Heroku Save Screenshot](../img/ci/droneio/screenshots/heroku-save-screenshot.png)
  50. 8. To have deployment for other branches including testing and production repeat steps 3 --> 7 with:
  51. - hello_world-qa for branch qa
  52. - hello_world-prod for branch prod
  53. 9. To change email reception settings click on notifications