ricardomol
  • Ricardomol Notes
  • Frontend
    • Javascript Toolchain
    • Javascript
      • Quirks
      • Articles
        • Function caching
        • 12 JS Tricks
      • Closures
      • Assorted
      • ES6
      • this
      • OOP
      • Async Programming
      • Functional Programming
      • Typescript
    • React
      • Patterns
        • Render props
      • React Router
    • Webpack
    • CSS
      • Resources
  • Backend
    • Python
      • Shallow copy vs deep copy
      • Classes
      • Resources
      • Python C Extensions
      • Coroutines
      • Exceptions
      • Context managers
      • One-Liners
      • Open function
      • Object introspection
      • Targeting Python 2 + 3
      • For - else
      • Comprehensions
      • Lambdas
      • __slots__ magic
      • Collections
      • Enumerate
      • Mutation
      • Map, Filter and Reduce
      • Decorators
      • Sets
      • Fluent Python summary
      • Quizes / Tips
      • Generators
    • Django
      • Generic Relations
      • FBV's vs CBV's
      • ORM
      • DRF
    • RESTful Architecture
    • Resources
  • Databases
    • Joins
    • Normalization
    • PostgreSQL
  • DevOps
    • Docker
      • 0. Resources
      • 2. Services
      • 3. Swarms
      • 5. Stacks
      • 6. Deploy your app
    • CI
      • CI with Django
    • CD
    • PaaS
    • WSGI servers
    • Django
      • Django Deployment
    • Modern DevOps with Django
  • Git
    • Git
  • Comp Sci
    • Big O Notation
    • Patterns
    • Programming paradigms
  • Assorted
    • TCP vs UDP
    • Tests
    • MongoDB
    • Node
      • Resources
    • Go
    • HTTP vs HTTP2
    • GraphQL
    • Books
    • Vim
    • IPv4 vs IPv6
    • Regex
    • Redis
    • Celery
      • Brokers
    • Caching
  • SECURITY
    • Security
Powered by GitBook
On this page
  • Continuous Integration
  • Importance
  • Automated testing
  • Continuous integration example
  • Open source CI projects
  • Jenkins CI resources
  • General CI resources
  1. DevOps
  2. CI

CI with Django

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

PreviousCINextCD

Last updated 6 years ago

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 .

Automated testing

Another major advantage of CI.

Broken deployments can be prevented by running a comprehensive test suite of and 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.

General CI resources

is a common CI server for building and deploying to test and production servers. .

is a CI server by that was designed with best practices for the build and test & release cycles in mind. .

is a continuous integration framework with a set of components for creating your own CI server. It's written in Python and intended for development teams that want more control over their build and deployment pipeline. .

is JetBrains' closed source CI server that requires a license to use.

Learn more via the following resources or on .

My book on walks through every step of setting up a Jenkins project with a WSGI application to enable continuous delivery. Take a look if you're not grokking all of the steps provided in these other blog posts.

shows how to set up a Ubuntu instance with a Jenkins server that'll build a project.

is another solid tutorial that also shows how to send email notifications as part of the build process.

is a classic detailed article by Martin Fowler on the concepts behind CI and how to implement it.

is not specific to Python but a great read on what it entails.

uses well done drawings to show how continuous integration and delivery works for testing and managing data.

is a retrospective on learning CI from a Rackspace intern on how she learned the subject.

gives a high level overview of six CI tools from a programming language agnostic perspective.

explains the UK's Government Digital Service continuous integration configuration that relies on .

lists a slew of hosted CI services roughly ranked by user upvotes.

includes advice on checking in code, commit tests and reverting to previous revisions.

gives an interesting perspective on ways to rank the effectiveness of how teams use their CI tooling.

is a high-level overview of how CI can build trust both among developers and between developers and non-technical people in an organization. The post also discusses tasks related to setting up reliable CI such as test environments, and visibility into the CI results.

(PDF) strongly advises securing your continuous integration server just as you would every other part of your production application, unless you want your environment to be vulnerable to malicious actors.

provides metrics for what you should measure with your CI/CD setup to improve the process for helping your development teams ship code.

has some solid general advice for culling problematic tests, ensuring the integration speed supports the development culture you are building and keeping all code in source control instead of having complicated logic configured within the CI server.

gives a high level overview of concepts such as shipping velocity, test execution and environment provisioning with regards to CI configurations.

Jenkins
Jenkins source code is on GitHub
Go CD
ThoughtWorks
Go CD source code is on GitHub
BuildBot
BuildBot source code is on GitHub
TeamCity
the dedicated Jenkins page
deploying Python web applications
Assembling a continuous integration service for a Django project on Jenkins
Django
Setting up Jenkins as a continuous integration server for Django
What is continuous integration?
Continuous Deployment For Practical People
Continuous Integration & Delivery - Illustrated
Diving into continuous integration as a newbie
6 top continuous integration tools
Updating the GOV.UK Continuous Integration environment
Jenkins
StackShare's Continuous Integration tag
Good practices for continuous integration
Scoring Continuous Integration
Why Continuous Integration Is Important
integration testing
Continuous Intrusion: Why CI tools are a hacker's best friend
Measuring and Improving your CI/CD Pipelines
Six rules for setting up continuous integration systems
How to Identify Major Blockers in a CI/CD Pipeline
microservices
unit
integration tests