
Experience hands-on learning with a comprehensive GitLab CI/CD course featuring 50 tasks, covering environment setup, beginner to advanced pipelines, Kubernetes, Docker, Terraform, and DevSecOps security.
Learn to create a GitLab account, sign up via Google, verify email, add contact details, choose a role, and create the group ci cd and project docker-ci for hands-on labs.
Learn how to set up an AWS free tier account, verify email, provide root user credentials, link a payment method, complete identity verification, and sign in to the console.
download and install PuTTY on Windows, connect to an aws virtual machine, and set up a GitLab runner to manage ci cd pipelines with a dedicated back-end VM.
Launch an AWS EC2 t2 micro free tier instance and prepare it as a GitLab runner by using a PEM key, converting to PPK, and connecting via SSH as ec2-user.
Set up and bind a custom GitLab runner on an EC2 instance using Docker, disable shared runners, and register the runner with your project using tags like aws-ec2.
Install docker on the linux EC2 instance, grant passwordless sudo to the GitLab runner user, then start and enable docker and verify with docker ps.
Connect to an EC2 instance via putty and edit the GitLab runner config to raise the concurrent limit from one to five. Restart the runner and verify its status.
Explore how CI/CD automates code deployment across dev, QA, and production, building docker images, testing, and deploying through build, test, and deploy stages to improve speed, reliability, and consistency.
Discover how GitLab CI automates build, test, and deployment pipelines from your repository. Learn about YAML configurations, runners, and the role of jobs and stages in pipeline execution.
Understand GitLab CI stages and the difference between stage and stages, explore default stages like .pre, build, test, deploy, and .post, and learn to bind and run jobs in parallel.
Explore real-time Docker ci cd in GitLab by building Docker images with a Docker file, pushing to a GitLab registry, and deploying containers.
Explore how the GitLab CI script keyword defines commands within a job, with before_script and after_script for setup and post-job actions, including CI/CD variables.
Design and run your first GitLab CI pipeline by creating a .gitlab-ci.yml with a test stage and test_job, using before_script, script, and after_script, and a custom runner.
Learn how to declare and use custom and predefined GitLab CI variables, control their precedence, and inject secrets securely into pipelines.
Define and mask secret variables in GitLab CI, set app_version in YAML, and view CI_PIPELINE_ID during builds. Use a custom AWS EC2 runner and apply variables to Docker image tags.
Discover how GitLab CI uses the .gitlab-ci.yml file to define jobs and pipelines, and how only and accept control when a job runs across branches.
Use GitLab CI rules to control when a job runs, replacing the only and accept approach, with evaluation in order for file changes, branch names, and merge requests.
Configure a GitLab CI job timeout in seconds, minutes, or hours to automatically fail long-running jobs; learn relation to project and runner limits with a sleep 80s vs 10s example.
Explore how the when keyword configures trigger conditions in GitLab CI, such as on success, on failure, and manual approvals across build, test, and deploy.
Learn how GitLab CI uses needs to run jobs in any order, letting build, test, and deploy run with dependencies, and explore concurrency limits on runners.
increase the concurrent limit on the gitlab runner to five by editing config.toml, restart the runner, and rerun the pipeline to run parallel jobs using needs.
Learn how to use the includes keyword in GitLab CI to import local or external YAML templates, enabling standardized, reusable configurations across projects and security scans.
Set up a real-time docker ci cd pipeline on GitLab by creating a docker file and index.html, building a docker image with nginx, and testing in a docker-in-docker workflow.
Learn how GitLab CI integrates package and container registries to store and share Maven and npm packages, and to publish Docker images securely within private projects.
learn to integrate gitlab ci cd with a container registry by creating a personal access token, logging in, building, and pushing docker images via a ci yaml workflow.
Learn how GitLab CI artifacts attach logs, reports, and directories to jobs, enable later stages to fetch them, and manage exclusions and expiry for Docker and security scan reports.
Bind artifacts to the GitLab CI job using the artifacts keyword and paths, and exclude files like the Dockerfile to collect artifacts for download after pipeline completion.
Publish a static website from your GitLab repository using GitLab pages, configure a pages job in .gitlab-ci.yml, and deploy to a default or custom domain with TLS.
Customize the pipeline by removing the pages deployment and deploy stage, add a test stage with a docker image job, and tag builds with the pipeline ID in the registry.
Explore GitLab CI environments to deploy code changes into static and dynamic environments, track deployments, and access deployed apps via environment URLs.
Update GitLab CI YAML to deploy a docker image on an AWS EC2 instance using a PEM key, SSH commands, and a deploy stage with environment tracking.
Explore GitLab CI templates, hidden keys and anchors, and the extends mechanism to reuse configurations and reduce copy-paste across build and test stages.
Define and apply a reusable Docker template in GitLab CI/CD to centralize tags and runner selection, then deploy and verify the latest container in the dev environment.
Schedule GitLab CI pipelines with pipeline schedules in the project build section, choosing a branch, cron-based intervals, time zone, runtime variables, and a clear description.
Learn how Kubernetes orchestrates containerized apps with cluster components like etcd, kube API server, scheduler, and controller manager; distinguish Docker from Kubernetes and explore pods and nodes.
Install helm, kubectl, and eksctl on the EC2 runner, configure the AWS CLI and IAM access, and prepare to install the GitLab agent and integrate GitLab CI with Kubernetes cluster.
Use x CTL to create an Elastic Kubernetes Service cluster on AWS named demo cluster in us east 1 with two t3.medium nodes. Verify connectivity with kubectl get all.
Connect a Kubernetes cluster to a GitLab project by deploying the GitLab agent, configuring a config.yaml whitelist, and running helm commands to install the chart.
Configure group-level ci/cd variables cube_context and cube_namespace to enable kubectl access to the Kubernetes cluster from a GitLab pipeline, using a kubectl image and the GitLab agent test namespace.
Explore Terraform, a HashiCorp infrastructure as code tool, using declarative configurations to provision resources across AWS, Azure, and GCP with benefits like consistency, repeatability, visibility, and version control.
Connect to the runner, install Terraform, and configure AWS credentials to deploy an S3 bucket with Terraform; run init, plan, apply, and examine the Terraform state file.
Automate Terraform changes with a GitLab ci/cd pipeline, using a remote http backend to manage state and running init, plan, and apply in the pipeline.
Explore security scans in a ci/cd pipeline, including sast, dast, container, dependency, iac, iast, and secret scanning. Detect and remediate vulnerabilities early to reduce production breaches.
Enable the security features in your GitLab repo and start a free trial. Then explore SAST, IAC testing, DAST, dependency and container scanning, and secret detection in the security configuration.
Implement a GitLab ci cd dast scanning stage using the dasty template, add a dast job after deploy, and review vulnerability reports for http vs https issues.
Implement container scanning in a GitLab CI/CD pipeline to assess Docker images for vulnerabilities. Use base-image checks and tools like Trivy and Gripe, review JSON reports, and fix critical issues.
Implement infrastructure as code scanning in a GitLab CI pipeline using a template to scan Terraform code, report vulnerabilities, and enforce secure S3 settings.
Begin a 50-assignment GitLab CI journey by configuring a Docker runner with AWS EC2 tags, creating an empty project, and building the base .gitlab-ci.yml to echo building.
Learn to configure a three-stage GitLab CI pipeline with pre check, build, and test stages, define pre check, build, and test jobs, and echo stage messages using a docker executor.
Configure the GitLab CI pre-check to run docker ps and docker images, listing running containers and local images on the executor, and update the GitLab CI YAML file.
Create a basic Dockerfile in the GitLab repository using an Ubuntu base image, add a DevOps label, and run a sleep for 120 seconds.
Build a docker image from the provided dockerfile using docker build, naming it first_image and defaulting to the latest tag when no tag is supplied, within a GitLab runner.
update the test job to use docker ps -a to list all containers, and walk through the GitLab CI pipeline from pre-checks to building a Docker image and tests.
Learn how to define and use user defined variables in GitLab CI pipelines by declaring image_name in the build job and injecting it into the Docker build command as DevOps-image.
Define project or group level ci/cd variables in GitLab and reference them in the pipeline to dynamically name docker images using the image_name variable.
Explore GitLab CI predefined variables and tag docker images with the CI pipeline ID to assign a unique build tag at runtime, using a dynamic tag in the build job.
use the GitLab CI predefined variable project name as docker image name in the pipeline, edit the CI file, commit, and verify image name and tag from predefined variables.
Learn to add a before script to the build job in GitLab CI, print the Docker version, and prepare for logging into a container registry for deployment.
Add an after script under the build job to list Docker images after a build, and verify the image created with tag 170, with the pipeline triggered after committing changes.
Create a separate api directory with an Nginx-based Dockerfile exposing port 80 to enable parallel builds in a GitLab CI pipeline, and commit the file to set up multi-job stages.
Add a build job under the build stage in GitLab CI to docker build the Docker API image from the API directory using -f and -t with the latest tag.
Introduce a failing gitlab pipeline by adding a dummy command to the PreCheck job to trigger a failure, and explore handling pipeline failures at the gitlab level.
Enable allow failure in a non-critical pre-check to keep the GitLab CI pipeline running even when a dummy command fails.
Shift from beginner basics to intermediate GitLab pipelines by mastering stages, jobs, and before/after script sections. Explore how variables enhance pipelines and continue your hands-on journey into intermediate GitLab topics.
Increase the GitLab runner concurrency on an EC2 instance by editing the runner's config to six and restarting the GitLab runner to run six jobs in parallel.
Remove the dummy command from the precheck job and add a rules section to the build in GitLab CI YAML. Trigger the build only on the main branch, skipping others.
Learn how to run pre-check, build, and build API in parallel using the needs keyword in GitLab CI, with empty needs lists to make jobs independent and flexible dependency mapping.
Set a dependency between two GitLab CI jobs so the test job waits for the build job API using the needs field in the CI YAML, enabling controlled sequencing.
Learn to add a two-time retry in a GitLab CI build job using a dummy before_script command, and ensure a dependent test job still runs despite failures.
In this assignment, remove the dummy command from the build job's before script, add a 10-second timeout, and observe a timeout-driven failure and retry behavior in GitLab CI.
Remove the 10s timeout and set a ten-minute default pipeline timeout in GitLab CI YAML via the pipeline editor, then review the general CI settings.
Apply the when: manual keyword to the test job in GitLab CI/CD, enabling a manual approval step before triggering the test, mirroring deploy-stage control.
Learn to use the parallel keyword in GitLab CI to run a build job in parallel, configure two parallel jobs, and verify them in the pipeline.
Learn to orchestrate a downstream pipeline in GitLab CI by using the trigger keyword and include a child pipeline YAML from the main CI YAML.
Remove the trigger job and use the include keyword to merge a child-pipeline yaml into a single GitLab CI pipeline, using local references to combine multiple yaml files.
configure GitLab CI to trigger the test job only if any previous stage job fails, using when on_failure, and observe the test job skipping when builds succeed.
Remove the parallel section from the build job and add artifacts to capture the entire current working directory with path ./ in the GitLab CI pipeline, enabling artifact access.
Exclude unwanted files from build artifacts in GitLab CI by editing the GitLab CI YAML file, using the artifacts exclude setting, and verifying the build job and artifact browser.
Update GitLab CI artifacts by naming them DevOps and setting an expiry of one week using the pipeline editor, then verify the build artifact behavior in the pipeline.
Update the build job to upload artifacts only on failure using when: on_failure in GitLab CI YAML, enabling troubleshooting while avoiding artifacts on successful runs.
Update the GitLab CI YAML via the pipeline editor to remove on failure and set inherit to false, showing how the test job uses the ubuntu default image.
Edit the GitLab YAML on main branch to remove inherit from the test job and add a cache named my cache with path ./ to capture the current directory.
Upload an index.html to the GitLab repo, add a deploy stage with a pages job, and deploy to GitLab pages to host your site with optional custom domain.
Create a remote pipeline trigger by generating a pipeline trigger token in GitLab, then use a curl command to trigger the main branch and monitor the running pipeline.
Learn to create a GitLab CI template, define tags in the template body, and apply it across jobs in the main YAML.
Remove tags from all GitLab CI jobs and import a shared template to reuse the tag configuration, apply the template alias in each job for consistent settings and successful pipelines.
Practice using GitLab CI extends by creating a reusable template for tags (AWS, EC2) and applying it to all jobs, removing template imports, and verifying runners and tags at runtime.
Learn to create and manage GitLab pipeline schedules via the UI, configure cron timing for automated runs every five minutes, and set time zone and runtime variables.
Gitlab CI CD Hands On | Build your own 50 Gitlab Pipelines
Learn Gitlab by Doing | Gitlab CI CD Practice Questions with Answers | Gitlab CI CD Live Docker Project
This is a Hands On Practice Question/Solution based course , where Beginners/Professionals can practice the Gitlab CI CD Pipeline Setup.
This comprehensive course is designed to take you from beginner to advanced in GitLab CI/CD through 50 hands-on labs. Whether you're new to CI/CD or looking to expand your expertise, this course offers step-by-step guidance to master GitLab pipelines, automation, and deployment strategies.
You'll start with the basics — setting up GitLab, configuring runners, and building simple pipelines. As you progress, you'll dive into advanced concepts like triggers, caching, and deploying containerized applications to production. By the end of this course, you'll have a solid understanding of GitLab CI/CD best practices, with real-world projects to showcase your skills.
Course Outline:
1. GitLab Setup
AWS Account Setup
VM/EC2 for Runner Setup
GitLab Account Setup
GitLab Runner Setup
GitLab Runner Registration
Docker Setup on Runner
Sudo Setup on Runner
2. GitLab Hands-On (Beginner)
GitLab Stages
GitLab Jobs
GitLab Scripts
GitLab only
GitLab Tags
GitLab Variables
GitLab Predefined Variables
GitLab before_script
GitLab after_script
GitLab Allow Failures
GitLab needs
GitLab Rules
GitLab Timeout
GitLab Parallel Execution
Runner Concurrent Limits
3. GitLab Hands-On (Advanced)
GitLab Trigger
GitLab include
GitLab inherit
GitLab Cache
GitLab Pages
GitLab Access Tokens
GitLab Environments
GitLab Templates
GitLab CI CD | Artifacts, Pages, Package Registry and Container Registry
GitLab CI CD | Static/Dynamic Environments, Templating and Scheduler
GitLab CI CD | Kubernetes Cluster Integration (EKS)
GitLab CI CD | Terraform Integration with CI/CD
GitLab CI CD | Security Features in GitLab CI CD (DevSecOps) with Live Project
4. GitLab CI/CD Project
Dockerfile Setup
GitLab Container Registry Setup
GitLab Environment Setup
Build and Deploy to Production Environments
Key Takeaways:
Step-by-Step Labs for Practical Learning
50 Hands-On Tasks to Build your own pipeline
Real-World Deployment Scenarios
Emphasis on GitLab CI/CD Best Practices
Covers Docker Integration for Modern DevOps Workflows
End-to-End Project to Build and Deploy a Web Application
This course is perfect for developers, DevOps engineers, and system administrators aiming to master GitLab CI/CD. Whether you're automating simple tasks or deploying complex applications, this course will equip you with the skills to succeed.
Keep Learning , All the Best..