- Lab
- A Cloud Guru
Using Pull Requests For Release Gating
A part of developing your GitOps skillset, this lab introduces the student to GitHub Actions Workflow and challenges the student to build and push a container to Docker Hub. The application container may then be deployed to Kubernetes Clusters through Flux and the Deployment YAML required.
Path Info
Table of Contents
-
Challenge
Fork the linuxacademycontent/gitops Repo in GitHub
Use your personal account to fork the course repo into your own GitHub Account.
-
Challenge
Create a Docker Hub Folder to Receive the Pushed Container Images
Set up a folder for the container images in Docker Hub.
-
Challenge
Enable Actions WorkFlows In The Forked Repository
Go the to Actions tab and enable workflows.
NOTE: You will also need to add a secret to the repo for the Docker Hub Password. Use Settings and Secrets to add the password so the docker login in the workflow will push the image to your dockerhub registry.
-
Challenge
Edit the Workflow to Push Your Container Images to Your Docker Hub Registry
Edit the workflow provided with your Docker Hub information.
-
You must add a DOCKERPW secret to your repo with the docker hub password for your dockerhub account. This is done in GitHub under Settings->Secrets
-
You will need to edit the actions workflow to replace the [your docerhub userneme] clause with your actual dockerhub username.
This configure the actions workflow to push the container image to your docker hub registery.
You can test this on a push, command by just changing the python program a bit and watching the actions workflow run.
Once you have the workflow running, you can then edit the workflow to run for a pull request instead of a push.
Change the event that fires the workflow from push to pull_request.
-
-
Challenge
Change The Python Application And Open A Pull Request
Create a feature branch. Change the Python application, then commit the change. Then create a pull request and merge the change in. Examine the workflow actions run afterward and verify the container was pushed to the Docker Hub Registry.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.