Member-only story
Automatically Build and Deploy Your Python Application in 4 Easy Steps
Lift your Python development to the next level and save yourself time and hassle with CI/CD
When you finish a new version of your Python application, how do you build and deploy it? Do you change the version number, upload the new files to production, and be done with it?
There are better ways! Continuous Integration/Continuous Delivery (CI/CD) is the pinnacle of good software engineering practices. It’s the point where all other good practices come together.
CI/CD bridges the gap between development and operations because it automates and enforces important steps in building and deploying software. It ensures quality and takes human errors out of the loop.
This article will take an existing application and create a CI/CD pipeline for it. You’ll see how you can set up a professional CI/CD pipeline in under 15 minutes!
Requirements
To set up a good CI/CD pipeline, we need to have some other practices in place first:
- We must use a code version management system like Git.
- Our application should have automated tests (unit tests, integration tests).
- We should have at least a development, test, and production location for our software.
- We need a CI/CD system.
Setting up CI/CD may seem like a daunting adventure, but it really isn’t. In fact, you can allow yourself some shortcuts when starting out. In this article:
- Our test and development location will be our own PC.
- We’ll start with just one unit test.
- We’ll use GitHub to host our code and Docker Hub to host our finished application.
That leaves us with the final choice: Which CI/CD system should we use?
Which CI/CD System Should We Choose?
Several vendors offer CI/CD systems. A well-known and open-source system I’ve used in the past is Jenkins. It’s been around for a long time. The downside: It requires knowledge and time to set up and run. I’ve also been forced to…