Building a CI pipeline with GitHub Actions
GitHub Actions is a SaaS-based tool that comes with GitHub. So, when you create your GitHub repository, you get access to this service out of the box. Therefore, for people who are new to CI/CD and want to get started quickly, GitHub Actions is one of the best tools.
Now, let's try to create a CI pipeline for a Python Flask app running on a Docker container, and run some tests. If the tests pass, the build will pass, otherwise, it fails.
To access the resources for this section, cd
into the following:
$ cd ~/modern-devops/ch10/flask-app
The app.py
file consists of the following:
from flask import Flask from flask import make_response app = Flask(__name__) @app.route('/') def index(): return "Hello World!" @app.route('/<page>') def default(page): response = make_response('The page %s does not exist.' % page, 404) return response if __name__...