CI with Django

Source: https://www.fullstackpython.com/continuous-integration.html

Continuous Integration

Automates the building, testing and deploying of applications.

Importance

CI can dramatically reduce deployment times by minimizing steps that require human intervention.

Only minor downside: it takes some initial time by a developer to set up and then there is some ongoing maintainence if a project is broken into multiple parts, such as going from a monolith architecture to microservices.

Automated testing

Another major advantage of CI.

Broken deployments can be prevented by running a comprehensive test suite of unit and integration tests when developers check in code to a source code repository.

Any bugs accidentally introduced during a check-in that are caught by the test suite are reported and prevent the deployment from proceeding.

Continuous integration example

High level perspective on how CI and deployment can work

One potential way for continuous integration to work with source control and a deployment environment.
  1. New code is committed to a source repository

  2. A hook that notifies the CI server that new code needs to be built

  3. The CI server pulls the code to build and test it

  4. If all tests pass, the CI server begins the deployment process

  5. The new code is pulled down to the server where the deployment is taking place

  6. The deployment process is completed via restarting services and related deployment activities.

There are many other ways a CI server and its deployments can be structured.

Open source CI projects

Free and open source CI servers that are configurable based on a project's needs:

Jenkins CI resources

Commonly used as a CI server implementation for Python projects.

Open source and programming language agnostic.

Learn more via the following resources or on the dedicated Jenkins page.

General CI resources

Last updated