- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

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.

Lab 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.
About the author
Real skill practice before real-world application
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.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.