GitLab CI/CD

DevOps

Prerequisites to Learn GitLab CI/CD

1. Git Knowledge (Mandatory)

2. Basic Linux knowledge (Mandatory)

3. Container knowledge (Optional)

4. Cloud knowledge (Optional)


Duration: 10 Days

Venue: Classroom Based/Virtual Instructor-Led Training

Course Outline


1. Introduction to CI/CD

  • What is Continuous Integration
  • What is Continuous Delivery
  • What is Continuous Deployment
  • CI/CD vs Traditional Software Delivery
  • Benefits of CI/CD
  • DevOps pipeline overview
  • CI/CD lifecycle



2. Introduction to GitLab Platform

  • What is GitLab
  • GitLab architecture
  • GitLab SaaS vs Self-Managed
  • GitLab features overview
  • GitLab UI walkthrough
  • GitLab project structure
  • GitLab groups and subgroups
  • GitLab repositories



3. Git Fundamentals (Required for CI/CD)

  • What is Git
  • Installing Git
  • Git workflow
  • Git repository concepts
  • Git clone
  • Git commit
  • Git push / pull
  • Git branches
  • Git merge
  • Git rebase
  • Git tags
  • Merge requests in GitLab



4. GitLab CI/CD Core Concepts

  • What is GitLab CI/CD
  • CI/CD pipeline overview
  • .gitlab-ci.yml file
  • Pipeline stages
  • Jobs
  • Runners
  • Executors
  • Artifacts
  • Cache
  • Pipeline triggers



5. GitLab Runners

  • What is a GitLab Runner
  • Shared runners vs specific runners
  • Runner architecture
  • Installing GitLab Runner
  • Registering runners
  • Runner configuration
  • Runner executors
  • Shell executor
  • Docker executor
  • Kubernetes executor
  • Scaling runners



6. Creating Your First Pipeline

  • Creating .gitlab-ci.yml
  • Basic pipeline example
  • Job execution
  • Pipeline visualization
  • Pipeline logs
  • Pipeline status

Lab:

  • Create a simple pipeline that prints Hello World



7. Pipeline Stages and Jobs

  • Defining stages
  • Job dependencies
  • Parallel jobs
  • Sequential jobs
  • Manual jobs
  • Delayed jobs
  • Retry jobs
  • Job timeouts

Lab:

  • Build → Test → Deploy pipeline



8. CI/CD Variables and Secrets

  • Environment variables
  • Project variables
  • Group variables
  • Protected variables
  • Masked variables
  • Secret management
  • Using variables in pipelines

Lab:

  • Use variables in a deployment job



9. Artifacts and Caching

  • What are artifacts
  • Artifact storage
  • Artifact expiration
  • Downloading artifacts
  • What is caching
  • Cache vs artifacts
  • Cache strategies

Lab:

  • Build code and pass artifact to next stage



10. GitLab Pipeline Triggers

  • Trigger pipelines manually
  • Pipeline schedules
  • API triggers
  • Trigger tokens
  • Downstream pipelines
  • Multi-project pipelines



11. Branch Based Pipelines

  • Pipelines per branch
  • Feature branch pipelines
  • Merge request pipelines
  • Tag pipelines
  • Protected branches

Example:

only:

 - main



12. Merge Request Pipelines

  • Merge request workflow
  • Merge request pipelines
  • Pipeline approvals
  • Code review integration
  • Required pipeline success before merge



13. Environments and Deployments

  • What are environments
  • Environment types
  • Development
  • Staging
  • Production
  • Environment URLs
  • Deployments
  • Rollbacks
  • Deployment history



14. CI/CD for Docker

  • Docker basics
  • Building Docker images
  • Docker registry
  • GitLab container registry
  • Docker login
  • Push Docker image

Lab:

  • Build and push Docker image using pipeline



15. CI/CD for Kubernetes

  • Kubernetes basics
  • GitLab Kubernetes integration
  • Deploying to Kubernetes
  • Helm deployments
  • Kubernetes environments



16. Security in GitLab CI/CD

  • Secure variables
  • Protected branches
  • Protected environments
  • Access control
  • Token security

GitLab security tools:

  • SAST
  • DAST
  • Dependency scanning
  • Container scanning



17. Advanced Pipeline Features

  • Pipeline templates
  • YAML anchors
  • Includes
  • Child pipelines
  • Dynamic pipelines
  • Matrix builds



18. Performance Optimization

  • Parallel jobs
  • Runner autoscaling
  • Cache optimization
  • Artifact management
  • Pipeline speed improvements



19. Monitoring and Troubleshooting

  • Pipeline monitoring
  • Job logs
  • Debugging pipelines
  • Runner troubleshooting
  • Failed pipeline analysis



20. GitLab DevOps Lifecycle

GitLab integrates entire DevOps lifecycle:

  • Plan
  • Code
  • Build
  • Test
  • Release
  • Deploy
  • Operate
  • Monitor



21. Real-World CI/CD Pipeline Example

Example workflow:

Developer pushes code →

GitLab pipeline triggers →

Code builds →

Unit tests run →

Docker image built →

Image pushed to registry →

Deployment to Kubernetes →

Production release



22. Best Practices for GitLab CI/CD

  • Keep pipelines simple
  • Use caching effectively
  • Secure secrets
  • Use pipeline templates
  • Separate environments
  • Use automated testing
  • Enable merge request pipelines



23. Capstone DevOps Project

Build a complete CI/CD system:

Pipeline stages:

  1. Code commit
  2. Build application
  3. Run tests
  4. Build Docker image
  5. Push to registry
  6. Deploy to Kubernetes
  7. Run integration tests


REGISTER NOW

Learning Experience Survey

Learning Experience Survey

Learning Experience Survey