
Explore GitLab CI/CD fundamentals by building a pipeline that builds, tests, and deploys a simple website to AWS, while embracing automation, DevOps best practices, and GenAI features.
Register a GitLab account, sign up with Google or email, use the Ultimate plan for 30 days, and create your first project with a group name and project name.
Learn to verify your GitLab account with a phone number, create a basic .gitlab-ci.yml pipeline, commit changes, and run your first CI/CD job that echoes hello.
View a pipeline as a car assembly line: follow an ordered, connected sequence of steps, with some steps running in parallel and final testing to ship the software product.
This lecture aims to give you an understanding what pipelines are and how they can be built into Gitlab CI following a very simple example. This will use two simple stages and define two jobs assigned to each stage in Gitlab CI.
Create a two-stage GitLab CI pipeline with build and test stages, persist car.txt as an artifact, and verify its existence and content with cat, test, and grep.
Understand how GitLab CI/CD uses a docker executor to run jobs with default or specified images. Learn about artifacts, build directories, and isolated environments enabling portable, concurrent pipelines.
Compare GitLab.com managed and self-managed deployments for your pipelines. The free plan offers 400 compute minutes, with add-ons and the option to run your own runners on your infrastructure.
Learn how Linux commands power GitLab pipelines through the CLI and shell, replacing graphical interfaces with scripted automation and emphasizing correct command order.
Master YAML basics for GitLab CI/CD by mastering indentation with spaces, proper colon usage, and list syntax, plus common invalid YAML pitfalls and how to fix them.
Improve the car assembly pipeline by adding engine and wheels, ensure tests verify chassis, engine, and wheels, and learn to diagnose test failures via logs.
Learn how exit codes determine GitLab CI/CD behavior: zero means success, non-zero fails the job and stops the pipeline, with debugging tips and an exit 1 example.
Practice this lab to recap linux commands in a terminal. Create a build directory and use mkdir, cd, pwd, ls, echo, cat, append, grep, and test while checking exit status.
Develop essential DevOps and GitLab CI/CD troubleshooting skills by debugging pipelines, reading logs, and practicing incremental changes to diagnose errors.
Define DevOps as a culture-driven collaboration, not a standard or tool, and show how automation and ci/cd unlock continuous feedback and faster, reliable software delivery.
Learn continuous integration by building a from-scratch CI pipeline with GitLab, Docker, linting, and unit tests, focusing on merging changes from multiple developers and quick feedback.
Fork a GitLab repository to create your personal copy, set public visibility in your username dash project group, and practice building pipelines and CI/CD workflows for a React JS project.
Clone the repository locally, install dependencies with npm, build the project, and serve the build locally to illustrate the basic GitLab CI/CD workflow.
Learn how to choose the right docker image for your GitLab ci/cd pipelines by using official images from Docker Hub, understanding tags and image variants, and consulting framework documentation.
Adopt lightweight docker images like Alpine or Slim to cut download times in CI/CD pipelines and test lightweight options before resorting to full images.
Publish the build directory as a job artifact in GitLab CI/CD, so the website files are accessible after execution. Practice by completing the assignment on your own.
Create a new test job to verify the build artifact by checking that the build directory contains index.html, automating artifact validation in the ci/cd pipeline.
Define a new test stage and a test_artifact job using an alpine image. Run a file-existence test with -f for build/index.html and pass artifacts between jobs to verify pipeline integrity.
Master unit tests at the base of the testing pyramid and automate them with npm test and vitest in a GitLab CI pipeline for continuous integration.
Speed up GitLab CI/CD pipelines by running unit tests and test jobs in parallel, using two stages, improving maintainability and quick access to pipeline status via the built pipelines pane.
Explore how GitLab CI/CD uses default stages (pre, build, test, deploy, post) and how pipelines run even after removing explicit stages, thanks to GitLab's built-in stage definitions.
Integrate changes safely by using feature branches and automated GitLab pipelines that test before merging the main branch, with merge requests for peer review.
Configure merge requests in GitLab by selecting fast forward merge, enabling squashing, enforcing pipeline success and resolved discussions, and securing the main branch through protected branches and fork target settings.
Create your first merge request by branching from main, committing changes, and validating pipelines and tests, with clear titles, descriptions, templates, labels, and merge options.
Perform code reviews and merge changes via GitLab merge requests, comments, and discussions. Run pipelines and tests, then merge to main with clean commits.
Understand how a linter like ESLint enforces coding consistency in a GitLab CI/CD pipeline, generating a code quality report and integrating with merge requests.
Structure a GitLab CI pipeline by ordering stages and jobs to optimize execution, respect dependencies between build and test artifacts. Favor failing fast and balance parallelism across stages.
Simplify the GitLab CI/CD pipeline by disabling the test stage, creating a minimal alpine build with an index.html, and running the first job early to speed up feedback.
Learn how continuous integration drives a solid CI pipeline that builds and tests the application, and how merge requests protect the main branch through a review process.
Deploy a website to the cloud with a CI/CD pipeline on Netlify, building and testing serverless deployments while practicing continuous delivery and GitLab features include review environments and merge requests.
Download the zip, extract the build directory, and perform a manual Netlify deployment by uploading it, configuring a unique site name with your GitLab prefix, and verifying the deployment URL.
Learn to install and validate the Netlify CLI in a GitLab CI pipeline, using npm with Node.js 18+, a pre-stage job, and verify the installation with netlify --version before deployments.
Store deployment configuration in the GitLab pipeline using Netlify_Site_ID and Netlify_Auth_Token environment variables, enabling Netlify cli to deploy the correct site.
Learn to manage environment variables in ci/cd lab by checking definitions with echo and env, exporting a version, and creating an info.txt with the text 'Build version one two, three'.
Generate a personal access token for Netlify, then securely store and manage it in GitLab CI/CD variables, masking and hiding it to enable authorized deployments.
Store credentials in a secure store like gitlab instead of embedding them in pipeline configuration, enable environment-specific variables, and rely on masking to prevent credential exposure in logs for compliance.
Deploy to production via Netlify CLI in a GitLab pipeline, verify credentials with netlify status, and run netlify deploy --dir build --prod to publish the site live.
Explore content verification with curl by fetching a page, distinguishing static from rendered content, and validating text with grep, while handling http vs https and silent mode in CI/CD workflows.
Configure GitLab CI/CD pipelines to deploy only on the main branch by using rules with CI_COMMIT_REF_NAME and CI_DEFAULT_BRANCH, ensuring merge requests or branch builds skip deployment.
Learn how to test deployments in non-production environments such as dev, QA, and staging before going live, and use preview environments for merge requests to protect production.
Explore how continuous deployment can be controlled by a manual production step, pausing after staging and requiring manual approval to deploy to production in GitLab pipelines.
Create automatic review environments for every merge request to preview changes in a realistic setting before merge, using a deploy review stage with Netlify and live preview URLs.
Switch from a branch pipeline to a merge request pipeline by configuring a workflow that uses CI_PIPELINE_SOURCE and CI_COMMIT_BRANCH. Run build, test, and deploy_review for merge requests only.
Define static deploy environments for staging and production in GitLab using YAML configuration and the UI. Use environment variables and URLs to manage deployments and diagnose issues.
Replace manual checks with automated end-to-end tests using Playwright in a GitLab CI/CD pipeline. Configure APP_BASE_URL via environment variables and run npm run e2e with the Playwright docker image.
Learn to pass environment variables between GitLab pipeline jobs using a dot env artifact. Share the review URL with downstream end-to-end tests and inject it where needed.
Learn how to publish the end-to-end JUnit report for Playwright tests in GitLab CI/CD, using artifact publishing and selective pipeline rules to exclude the main pipeline.
Learn how to publish HTML reports from GitLab CI/CD using artifacts, access the Playwright HTML report in the post_deploy_review stage, and consider potential CSRF-related issues and the GitLab Pages alternative.
Review the GitLab CI/CD pipeline execution time, optimize deployments by preinstalling dependencies with a custom docker image, and use reusable templates and environment variables to reduce duplication.
Build and deploy a functional ci/cd pipeline using cli tools, variables, secrets, and manual approvals. Grasp the difference between delivery and deployment and sharpen linux scripting for the next section.
Learn to create a Dockerfile that builds a custom docker image for a ci pipeline, using from and run instructions to install npm dependencies and curl.
Learn how to run docker cli commands in a GitLab pipeline using a docker image with a docker-in-docker service and a docker daemon, and why pinned image tags matter.
Push a Docker image to the GitLab container registry using the fully qualified name and the CI registry image variable, then verify the published latest tag.
Use a custom docker image in the pipeline to replace deployment images, pin Netlify CLI version, leverage environment variables, and speed up deploys while avoiding breaking changes.
Learn to configure a scheduled pipeline that builds a Docker image once per day, week, or cron-based schedule and uses a rule to exclude that job from daily runs.
Explore how to locate .NET images in the Microsoft artifact registry at mcr.microsoft.com, not Docker Hub, and learn about tags, variants, and fully-qualified paths.
Explore a temporary AWS lab environment. Obtain and use AWS CLI credentials—access key id, secret access key, and session token—valid for 60 minutes.
Explore Amazon S3 as the simple storage service for DevOps, learning how to create a unique bucket, store objects, and serve public files over HTTP.
Learn to upload files to S3 from a GitLab pipeline using the official AWS CLI Docker image, override the entry point, and pin a fixed version for stable builds.
Learn how to use the AWS CLI to list s3 bucket contents, navigate the AWS CLI reference, handle credentials, and read documentation to solve real aws tasks.
Learn to implement identity management with AWS IAM by creating a least-privilege user for S3 access, generating and rotating AWS CLI access keys, and applying secure MFA practices.
Add aws access key id and secret access key as environment variables in GitLab, protect on main, then retry the job to verify S3 access.
Learn how to upload a local file to an S3 bucket using the AWS CLI in a GitLab pipeline, with a simple index.html and environment variable bucket name.
Use S3 sync to upload the build directory to a target bucket, replacing old files during the deploy stage and deploying the site to AWS.
Explore how a simple pipeline builds and deploys a static website to the AWS cloud, using S3 for storage and web hosting, and mastering the AWS CLI for deployment tasks.
Learn to launch an Ubuntu EC2 instance, connect via EC2 Instance Connect, run basic Linux commands, install packages, and stop or terminate to manage costs.
Learn to deploy a simple website by launching an Amazon Linux 2023 EC2 instance, securing via SSH key. Install nginx with dnf and test http access using the public IP.
Master how to test server connectivity using netcat (nc) in the terminal, verify port 22 access, interpret timeouts, and troubleshoot AWS security group rules for SSH.
Store the SSH private key in GitLab as a file variable to expose a path to the key in pipelines. Understand viewing the path, permissions, and visibility limits.
Run commands remotely over SSH in GitLab CI pipeline, moving setup steps into before script and executing commands like who am I, touch, and ls on the remote server.
Learn to securely upload files to a remote server with SCP, including single-file uploads and recursive directory transfers, and troubleshoot common permission and path errors in deployment.
Use rsync to synchronize changed or new files from your CI/CD build directory to the remote deploy directory, enable verbose output, compress data, and delete outdated files.
Learn to deploy on a server using a Bash deployment script, zip the build, upload with scp, and run deploy.sh via ssh with rsync and a smoke test for GitLab.
Establish ssh connections by generating an ssh key pair and storing the private key in GitLab. Verify authenticity with a known hosts file and transfer files using scp or rsync.
Explore how Amazon ECS lets you deploy containerized applications on the AWS cloud using Docker containers, with clusters and task definitions, without managing servers.
Explore ECS infrastructure with two launch modes—EC2 and Fargate (serverless)—comparing container management, cost implications, and practical steps using the AWS calculator for planning.
Create your first ECS cluster using AWS Fargate, with a clear naming convention (application name, cluster, prod) to separate environments and avoid costs when idle.
Create a Dockerfile, build the image with the docker build command, push to Amazon Elastic Container Registry, and deploy to ECS using a GitLab pipeline to automate.
Learn to store docker images in Amazon Elastic Container Registry (ECR) by creating a repository and tagging images. Authenticate with AWS ECR using get-login-password and push to the private registry.
Learn how to align a Docker image built in ECR with an ECS task definition, replacing the Nginx image from Docker Hub, handling execution roles, tags, and deployment rollbacks.
Use sed to replace placeholders in deployment.yaml by defining an appname environment variable and performing in-place substitutions. Copy deployment.yaml from the template to a new file before applying the substitutions.
Explore advanced GitLab features, including handling jobs that fail randomly, reusing configurations, importing configurations from external files or projects, and publishing websites with GitLab infrastructure.
Learn how to use the allow_failure keyword to let non-critical jobs fail without stopping the pipeline, or other pipelines, refine with exit_codes, and optionally retry to decide final status.
Explore yaml anchors and aliases to reduce duplication in GitLab CI/CD pipelines, using anchors, aliases, and merge keys to create reusable templates and common blocks like dependencies and before_script.
Master YAML anchors and aliases to create reusable deploy templates for staging and production in GitLab CI/CD, apply the dry principle, and override environment and variables with the merge key.
Explore how extends reuses configuration to create modular job templates in GitLab CI/CD, inheriting from a template and merging variables automatically while overriding environment, stage, and script as needed.
The lecture introduces GitLab's include feature to simplify and reuse pipeline configurations by splitting yaml files into local, remote, and project includes, with practical setup examples.
Master writing multi-line commands in GitLab pipelines using YAML's pipe literal and line continuation, enabling readable curl requests and script blocks while addressing log collapsing and external scripts.
Publish html reports with GitLab Pages, comparing artifacts and pages, and learn to enable pages with a public directory, a deploy job, and a published property for custom report paths.
Use runner tags to control where a GitLab job runs, selecting architecture like ARM64 or operating systems, by assigning required tags and ensuring every tag is met.
Explore how git strategy none skips repository setup in GitLab CI/CD, reducing time by avoiding git clone or fetch, and compare Job 1 and Job 2 to see faster execution.
Disable artifact downloads in GitLab CI/CD pipelines by using the dependencies keyword to specify which artifacts to download, ensuring unit tests only pull needed files and improving pipeline performance.
Explore stageless pipelines in GitLab CI/CD by using the needs keyword to run jobs out of order, enabling parallel execution and faster pipelines through explicit dependencies.
Explore how caches speed GitLab CI/CD pipelines by storing dependencies like node_modules, enabling reuse across jobs while noting caching overhead and best practices.
Compare caches and artifacts to understand their distinct roles in GitLab CI/CD: caches speed up jobs by reusing files, while artifacts pass files between jobs.
Disable cache for specific jobs by configuring an empty cache list, preventing unnecessary cache operations and speeding up the pipeline.
Learn how to configure cache policy in a GitLab CI/CD pipeline, using a global_cache anchor to override pull or push behavior for jobs like unit_tests and create_banner.
Click the clear runner caches button to refresh cache keys with a new suffix, and recognize caches can speed up or slow down pipelines, demanding careful configuration for maintainability.
This course is neither endorsed by, nor in partnership, nor affiliated with GitLab, Inc.
SPECIFIC SKILLS YOU WILL LEARN
Pipeline Development - Create multi-stage GitLab CI/CD pipelines using YAML configuration. Configure automated unit testing with JUnit reports. Implement parallel job execution. Use conditional job execution with rules. Manage job dependencies and artifacts. Configure before_script and after_script hooks. Troubleshoot pipeline failures using exit codes.
Continuous Integration Practices - Configure merge request workflows with branch protection. Implement code review processes before merging. Add automated code linting for quality enforcement. Run unit tests before allowing merges. Generate and publish test reports. Implement smoke tests for deployment verification. Configure end-to-end testing with Playwright.
Docker Integration - Select appropriate Docker images for build environments (Alpine, slim variants). Create custom Dockerfile for applications. Build and tag Docker images in GitLab pipelines. Push images to GitLab Container Registry and Amazon ECR. Use Docker containers as pipeline job execution environments.
Deployment Strategies - Create deployment pipelines for multiple environments. Configure environment-specific variables and secrets. Implement manual approval gates for production deployments. Create dynamic review environments for merge requests. Deploy applications to remote servers using SSH, SCP, and rsync. Configure SSH key authentication and host verification. Run deployment scripts on remote servers.
AWS Cloud Deployment - Install and configure AWS CLI for infrastructure automation. Deploy static websites to Amazon S3 with bucket configuration and file syncing. Create and manage AWS IAM users and roles for secure credential management. Deploy containerized applications to Amazon ECS using Fargate and EC2 launch types. Create ECS task definitions and services. Update ECS deployments using AWS CLI. Store Docker images in Amazon ECR.
Pipeline Optimization - Implement caching strategies to speed up builds. Configure cache keys (static, dynamic, file-based). Manage artifact dependencies between jobs. Use stageless pipelines with the needs keyword. Skip repository cloning when not needed using GIT_STRATEGY. Optimize Docker image selection for faster execution.
Security and Secrets Management - Store credentials securely using GitLab CI/CD variables. Scope variables to specific environments. Follow best practices for handling sensitive data. Configure SSH private keys for deployment. Manage AWS access keys and secret keys safely.
COURSE STRUCTURE
Section 1 (21 lectures) - GitLab CI/CD fundamentals, DevOps concepts, pipeline architecture, YAML syntax, first pipeline creation, GitLab Runner understanding, Linux shell basics, exit codes.
Section 2 (25 lectures) - Continuous Integration with Docker build environments, automated testing, parallel execution, JUnit reports, merge request workflows, code linting, artifact publishing.
Section 3 (33 lectures) - Continuous Deployment to multiple environments, environment variables, secrets management, deployment strategies (manual, staging, production), review environments, Playwright E2E testing, HTML reports.
Section 4 (9 lectures) - Docker for DevOps including Dockerfile creation, Docker CLI in GitLab, building and pushing images, GitLab Container Registry, scheduled pipelines.
Section 5 (11 lectures) - AWS deployment using S3 static hosting, AWS CLI usage, IAM credential management, file uploading and syncing to S3.
Section 6 (12 lectures) - SSH deployment to Amazon EC2, Nginx web server setup, SSH connection configuration, SCP and rsync file transfers, remote script execution.
Section 7 (15 lectures) - Amazon ECS deployment including cluster creation, task definitions, service configuration, ECR integration, automated deployment updates, sed for file templating.
Section 8 (11 lectures) - Advanced features including job retry, allow_failure, YAML anchors and aliases, job templates, extends keyword, includes for configuration reuse, CI/CD components, multi-line scripts, background processes, GitLab Pages, runner tags.
Section 9 (12 lectures) - Performance optimization including GIT_STRATEGY options, disabling artifact downloads, stageless pipelines with needs, cache configuration (keys, policies, troubleshooting), cache vs artifacts comparison.
Section 10 (1 lecture) - User questions and specific topics.
Section 11 (3 lectures) - Course conclusion and bonus content.
PRACTICE COMPONENTS
The course includes quizzes testing fundamental concepts, GitLab architecture, Docker integration, merge requests, deployment environments, and CI/CD best practices. Practice labs cover Linux commands, environment variables, curl for smoke testing, and JSON parsing with jq. Role-play exercises simulate real DevOps scenarios. Assignments include publishing build artifacts, adding test stages, publishing test reports, and managing AWS credentials with step-by-step solutions provided.
WORKPLACE APPLICATIONS
Automate manual deployment processes that are error-prone and time-consuming. Maintain consistent environments across development, staging, and production using Docker containers. Integrate AWS cloud services with CI/CD pipelines. Implement automated testing before code merges to prevent production bugs. Optimize pipeline execution speed to improve developer productivity. Establish deployment approval workflows for production releases. Create ephemeral review environments for feature branch testing. Implement infrastructure-as-code practices for reproducible deployments.
LEARNING APPROACH
This course provides foundational knowledge in GitLab CI/CD rather than promising instant expertise. It focuses on clear explanations of CI/CD concepts, step-by-step pipeline building guidance, practical examples applicable to real projects, troubleshooting common issues, and best practices for security, performance, and maintainability. The course emphasizes hands-on learning through building actual pipelines rather than theoretical knowledge alone.
COMPLEMENTARY SKILLS
This course connects to broader DevOps practices including infrastructure automation, containerization strategies, cloud architecture, automated testing methodologies, continuous delivery vs continuous deployment, version control workflows, and deployment pattern implementations. Skills learned apply to GitLab CI/CD specifically but transfer to understanding Jenkins, GitHub Actions, CircleCI, and other CI/CD platforms.
EXPECTED OUTCOMES AFTER COMPLETION
You will be able to create GitLab CI/CD pipelines from scratch for your projects. You will automate testing, building, and deployment workflows. You will deploy applications to AWS cloud infrastructure using multiple services. You will implement merge request workflows with automated quality checks. You will configure secure credential management for cloud deployments. You will optimize pipeline performance for faster execution. You will troubleshoot and debug pipeline failures independently. You will apply CI/CD best practices in professional development environments.
WHAT YOU WILL BUILD
Production-ready CI/CD pipelines that automate software testing, building, and deployment from code commit to production release across multiple environments (development, staging, production).
PREREQUISITES
Basic Git version control knowledge (commits, branches, push, pull). Familiarity with command-line interfaces and Linux/Unix terminal basics. Basic programming or scripting knowledge in any language. Docker experience, cloud platform knowledge, and software development workflow understanding are helpful but not required.
TARGET LEARNERS
Software Developers, DevOps Engineers, Site Reliability Engineers (SRE), System Administrators, Cloud Engineers seeking to automate testing, building, and deployment workflows.
CORE TECHNOLOGIES COVERED
GitLab CI/CD pipelines, YAML configuration, Docker containers, AWS S3, AWS ECS, AWS ECR, AWS IAM, AWS CLI, Amazon EC2, SSH deployment, SCP, rsync, Playwright end-to-end testing, JUnit test reports, GitLab Container Registry, GitLab Runner, merge request workflows, code linters, pipeline optimization, caching strategies, environment variables, secrets management.
Legal Disclaimer
This course is an independent educational resource and is not endorsed by, affiliated with, or associated with GitLab Inc. or any of its products or services. GitLab and the GitLab logo are trademarks of GitLab Inc. All product names, logos, and brands mentioned in this course are the property of their respective owners.
This course contains promotional materials.