GitLab DevOps Tool Interview Questions & Answers
GitLab DevOps Tool Interview Questions & Answers
It’s more than just an interview prep resource—it’s a practical learning companion
that explains not just the what, but the why and how behind every concept, complete
with examples, required skills, and hands-on steps.
The questions span beginner to expert levels, ensuring it's useful for both freshers
and seasoned professionals.
🧠 Technology Areas Covered
This guide covers end-to-end DevOps lifecycle topics, including:
● Core GitLab CI/CD Concepts – Pipelines, stages, jobs, runners, YAML files.
✅ GitLab Platform
● Understanding of .gitlab-ci.yml syntax
✅ DevOps Practices
● CI/CD pipeline creation and optimization
✅ Cloud Ecosystems
● AWS CLI, Azure CLI, Google Cloud SDK
✅ Project Exposure
● Experience with monorepos, microservices, GitOps, and real-world delivery
models
🔥 Final Thoughts
This guide isn’t just a set of questions—it’s a complete roadmap that transforms you
into a confident, job-ready Cloud & DevOps professional. Whether you are preparing
for an interview or aiming to upgrade your GitLab DevOps proficiency, this resource
will serve you as a hands-on, practical, and interview-focused toolkit.
❓ Question:
Why do many DevOps engineers struggle to clear interviews despite learning tools
and technologies?
✅ Answer:
Many DevOps engineers face repeated interview failures not because they lack
theoretical knowledge, but because they:
● Result: They can't confidently explain how these tools are integrated in
production workflows or how to troubleshoot when things go wrong.
💡 Example: Saying "I know how to deploy with GitLab CI/CD" is not enough.
➡️
Interviewers expect:
“I configured GitLab CI/CD to deploy a containerized microservice to Kubernetes
using Helm charts, integrated with Trivy for security scanning and Terraform for IaC
provisioning.”
● Problem: Even when engineers have done hands-on labs or POCs, they fail to
structure their explanation in interviews.
💡 Example Fix: Use this 4-part storytelling format when explaining any project:
1. Problem: What was the business or technical challenge?
2. Solution: What did you build or automate?
3. Tools Used: Which DevOps tools and cloud services did you integrate?
○ Pipeline optimization
✅
✅
Explains pipeline configs, YAML examples, and advanced GitLab use cases
Highlights deployment strategies, rollback, disaster recovery, GitOps, and more
**Follow this guide not just to prepare answers, but to build your own mini-projects and turn them
into interview-winning stories.
1. Understanding GitLab CI/CD Pipelines
Question
A GitLab CI/CD pipeline is a set of automated processes used to build, test, and deploy applications
in GitLab. It consists of multiple stages and jobs defined in a .gitlab-ci.yml file. When a new
commit is pushed, GitLab executes the pipeline according to the defined configuration.
Example:
Unset
stages:
- build
- test
- deploy
build_job:
stage: build
script:
- echo "Building the project"
- make build
test_job:
stage: test
script:
- echo "Running tests"
- make test
deploy_job:
stage: deploy
script:
- echo "Deploying the application"
- make deploy
This configuration defines three stages (build, test, deploy). Each stage runs sequentially, ensuring
proper execution order.
What are GitLab Runners, and what are the different types?
GitLab Runners are agents responsible for executing CI/CD jobs. They can be configured as shared
(used by multiple projects) or specific (dedicated to a project).
Types of runners:
Unset
gitlab-runner register \
--url https://gitlab.com/ \
--registration-token YOUR_TOKEN \
--executor docker \
--docker-image alpine:latest
This registers a Docker runner that executes jobs in an Alpine Linux container.
Artifacts and caching are both used to store files between CI/CD jobs, but they serve different
purposes:
● Artifacts: Used to store job-generated files that need to be available after the pipeline
finishes (e.g., compiled binaries, test reports).
● Cache: Stores dependencies or frequently used files to speed up jobs but is not meant for
long-term storage.
Unset
build:
stage: build
script:
- make build
artifacts:
paths:
- build/output.zip
cache:
key: dependencies
paths:
- vendor/
What are GitLab environments, and how are they used in deployment strategies?
GitLab environments define where an application is deployed (e.g., staging, production). They help
track deployments and rollback changes if needed.
Deployment strategies:
This associates the deployment with the production environment and provides a direct URL for
tracking.
What are GitLab CI/CD variables, and how are they used to manage secrets?
GitLab CI/CD variables are key-value pairs used to store configuration values, credentials, and
environment-specific settings. They can be:
Unset
deploy:
stage: deploy
script:
variables:
ENVIRONMENT: production
Example: Defining a secret variable in GitLab UI (Settings > CI/CD > Variables) and using it in
a job:
Unset
deploy:
stage: deploy
script:
How does GitLab handle merge requests, and how can CI/CD pipelines be used for automated code
reviews?
GitLab Merge Requests (MRs) allow developers to propose and review code changes before merging
them into the main branch. CI/CD pipelines can be triggered to:
Unset
test:
stage: test
script:
- npm install
- npm test
only:
- merge_requests
This pipeline ensures that tests are executed before merging code.
when: never
What is GitLab Auto DevOps, and how does it simplify CI/CD pipelines?
GitLab Auto DevOps is a feature that automates the CI/CD pipeline by detecting project
configurations and applying best practices. It:
For applications using Kubernetes, Auto DevOps deploys them automatically using Helm charts.
Unset
services:
- name: mysql:latest
- name: redis:latest
deploy_backend:
stage: deploy
script:
deploy_frontend:
stage: deploy
script:
This configuration ensures that backend and frontend services deploy independently.
How can GitLab CI/CD be used for Infrastructure as Code (IaC) deployment?
GitLab CI/CD integrates with tools like Terraform, Ansible, and CloudFormation for IaC deployment.
Unset
stages:
- plan
- apply
terraform_plan:
stage: plan
script:
- terraform init
artifacts:
paths:
- tfplan
terraform_apply:
stage: apply
script:
This pipeline initializes Terraform, plans infrastructure changes, and applies changes manually for
safety.
How can GitLab CI/CD be used to enforce security and compliance in software development?
GitLab provides built-in security scanning tools to detect vulnerabilities in code, dependencies, and
container images. These tools include:
● Static Application Security Testing (SAST): Scans source code for vulnerabilities
● Dynamic Application Security Testing (DAST): Tests running applications for security flaws
● Dependency Scanning: Identifies outdated or vulnerable dependencies
● Container Scanning: Analyzes Docker images for vulnerabilities
Unset
stages:
- test
- security
sast:
stage: security
script:
- gitlab-sast-check
container_scan:
stage: security
script:
This pipeline ensures that security checks are part of the CI/CD process.
A multi-project pipeline allows multiple GitLab repositories to interact within a single CI/CD
workflow. This is useful for monorepos, microservices, or dependency management across
projects.
Unset
trigger_deployment:
stage: deploy
trigger:
project: my-org/deployment-repo
branch: main
Here, when this pipeline runs, it triggers a deployment pipeline in another repository.
Unset
stages:
- build
- test
- deploy
test_job:
stage: test
trigger:
include: 'child-pipeline.yml'
How can you optimize GitLab CI/CD pipelines for better performance?
Optimizing GitLab CI/CD pipelines helps reduce execution time and improve efficiency. Some best
practices include:
- build
- test
- deploy
cache:
key: dependencies
paths:
- node_modules/
build:
stage: build
script:
- npm install
artifacts:
paths:
- dist/
test:
stage: test
script:
- npm test
parallel: 3
✅
This pipeline:
✅
Runs test jobs in parallel for faster execution
Stores only dist/ folder as an artifact
A failed pipeline can occur due to various reasons, such as syntax errors, dependency failures, or
infrastructure issues.
1. Check pipeline logs: Identify the error message in GitLab’s job logs.
2. Re-run failed jobs: GitLab allows rerunning only the failed jobs.
3. Use manual debugging: Add echo statements or debug scripts in .gitlab-ci.yml.
4. Implement retry mechanisms: Use the retry keyword for transient failures.
stage: test
script:
- npm test
retry: 2
Unset
debug:
stage: debug
script:
- sleep infinity
when: manual
How can you deploy applications to a Kubernetes cluster using GitLab CI/CD?
GitLab CI/CD can be integrated with Kubernetes to automate deployments using kubectl, Helm, or
GitLab’s Kubernetes integration.
Unset
stages:
- build
- deploy
deploy:
stage: deploy
image: google/cloud-sdk
script:
only:
- main
How can you implement Blue-Green and Canary deployments in GitLab CI/CD?
Blue-Green Deployment: Deploys a new version (green) while keeping the old version (blue)
running, then switches traffic once the new version is tested.
Canary Deployment: Gradually rolls out the new version to a small subset of users before full
deployment.
Unset
stages:
- deploy
- switch
deploy_green:
stage: deploy
script:
switch_traffic:
stage: switch
script:
Unset
deploy_canary:
stage: deploy
script:
How do you implement disaster recovery and rollback strategies in GitLab CI/CD?
Disaster recovery (DR) and rollback strategies ensure that a failed deployment can be reverted
quickly.
Unset
rollback:
stage: deploy
script:
✅ This command undoes the last deployment, restoring the previous stable version.
Example: Automating rollback with Git tags:
Unset
rollback:
stage: deploy
script:
Monitoring and logging help diagnose failures and optimize performance in GitLab CI/CD.
Example: Capturing pipeline logs and storing them in an external log system:
Unset
logging:
stage: monitor
script:
✅ Captures GitLab Runner logs and sends them to an external log server.
Example: Using Prometheus to monitor GitLab CI/CD:
Unset
monitoring:
stage: monitor
script:
- curl http://prometheus.example.com/metrics
How can GitLab CI/CD be used to manage infrastructure as code (IaC) with Terraform?
GitLab CI/CD can automate Terraform workflows to provision, update, and destroy infrastructure.
This is useful for managing cloud resources in AWS, Azure, or Google Cloud.
Unset
stages:
- validate
- plan
- apply
terraform_validate:
stage: validate
image: hashicorp/terraform:latest
script:
- terraform init
- terraform validate
terraform_plan:
stage: plan
image: hashicorp/terraform:latest
script:
terraform_apply:
stage: apply
image: hashicorp/terraform:latest
script:
only:
- main
Multi-cloud deployments involve deploying applications across multiple cloud providers (AWS, Azure,
GCP) to increase reliability and avoid vendor lock-in.
● Environment-specific jobs
● Cloud provider CLI tools (AWS CLI, gcloud, az CLI)
● Terraform for cloud provisioning
Unset
stages:
- deploy-aws
- deploy-gcp
deploy_to_aws:
stage: deploy-aws
image: amazon/aws-cli
script:
deploy_to_gcp:
stage: deploy-gcp
image: google/cloud-sdk
script:
GitLab CI/CD can automate the deployment of serverless functions to platforms like AWS Lambda,
Google Cloud Functions, and Azure Functions.
Unset
stages:
- deploy
deploy_lambda:
stage: deploy
image: amazon/aws-cli
script:
only:
- main
Unset
deploy_serverless:
stage: deploy
image: node:latest
script:
- serverless deploy
✅ Deploys a serverless function using the Serverless Framework.
What Skills Required to Prepare This Question
● Experience with serverless platforms (AWS Lambda, GCP Functions, Azure Functions).
● Knowledge of API Gateway and event-driven architectures.
● Familiarity with Serverless Framework and cloud provider CLIs.
How can you implement security scanning and compliance checks in GitLab CI/CD?
GitLab provides built-in security scanning tools to identify vulnerabilities in code, dependencies, and
container images.
1. Static Application Security Testing (SAST) – Analyzes source code for vulnerabilities.
2. Dynamic Application Security Testing (DAST) – Scans running applications for security issues.
3. Dependency Scanning – Detects vulnerabilities in dependencies.
4. Container Scanning – Scans Docker images for security risks.
5. License Compliance – Ensures compliance with open-source licenses.
Unset
stages:
- security
sast:
stage: security
image: registry.gitlab.com/gitlab-org/security-products/sast:latest
script:
- /analyzer run
artifacts:
reports:
sast: gl-sast-report.json
dependency_scanning:
stage: security
image:
registry.gitlab.com/gitlab-org/security-products/dependency-scanning:la
test
script:
- /analyzer run
artifacts:
reports:
dependency_scanning: gl-dependency-scanning-report.json
How do you integrate performance and load testing into GitLab CI/CD pipelines?
Performance testing ensures that an application can handle expected loads without degrading
performance.
Unset
stages:
- test
load_test:
stage: test
image: justb4/jmeter:latest
script:
paths:
- result.jtl
Unset
stages:
- test
performance_test:
stage: test
image: loadimpact/k6
script:
- k6 run performance_test.js
How can GitLab CI/CD handle safe database migrations using Blue-Green strategies?
Database migrations must be handled carefully to avoid downtime and data loss.
1. Blue-Green Deployment – Maintain two database versions and switch traffic.
2. Zero-Downtime Migrations – Use feature flags and roll forward changes.
3. Rolling Back Migrations – Version control schema changes.
Unset
stages:
- migrate
migrate_database:
stage: migrate
image: postgres:latest
script:
only:
- main
stage: migrate
image: boxfuse/flyway
script:
How can GitLab CI/CD be used to implement feature flags and progressive delivery?
Feature flags enable developers to deploy new features without exposing them to all users
immediately.
Unset
stages:
- deploy
deploy_with_flag:
stage: deploy
script:
--data "name=new-feature&active=true" \
"https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/feature_flags"
Unset
progressive_rollout:
stage: deploy
script:
Blue-Green deployments help reduce downtime and rollback risks by maintaining two environments:
1. Deploy the new version (Green) alongside the existing Blue environment.
2. Run tests on Green before switching traffic.
3. Update the load balancer to direct traffic to Green.
4. If issues arise, rollback to Blue instantly.
Unset
stages:
- deploy
- switch
- cleanup
deploy_green:
stage: deploy
image: nginx:latest
script:
switch_traffic:
stage: switch
script:
- nginx -s reload
cleanup_blue:
stage: cleanup
script:
- docker rm myapp-blue
✅ Stops and removes the old Blue instance after successful deployment.
NGINX configuration update redirects traffic from Blue to Green.
Canary deployments allow new versions to be gradually rolled out to a small subset of users before
full deployment.
Unset
stages:
- deploy
deploy_canary:
stage: deploy
image: google/cloud-sdk
script:
Unset
deploy_canary:
stage: deploy
script:
--default-actions
'[{"Type":"forward","TargetGroupArn":"$CANARY_TG","Weight":10},{"Type":
"forward","TargetGroupArn":"$PROD_TG","Weight":90}]'
How can GitLab CI/CD be integrated with ArgoCD for GitOps-based Kubernetes deployments?
GitOps ensures Kubernetes deployments are fully managed via Git repositories. ArgoCD is a GitOps
tool that continuously syncs Kubernetes manifests from Git to the cluster.
Unset
stages:
- sync
argocd_sync:
stage: sync
image: bitnami/kubectl
script:
- export ARGOCD_SERVER="argocd.example.com"
How can GitLab CI/CD be used for deploying updates to Edge and IoT devices?
Edge computing requires software updates to be delivered remotely to distributed IoT devices.
GitLab CI/CD can be used to:
Unset
stages:
- deploy
deploy_iot:
stage: deploy
script:
- scp firmware.bin user@device-ip:/firmware/
29. GitLab CI/CD for Serverless Deployments (AWS Lambda, Azure Functions,
Google Cloud Functions)
Question
How can GitLab CI/CD be used to deploy serverless applications to AWS Lambda, Azure Functions, or
Google Cloud Functions?
Serverless computing allows applications to run without managing servers. GitLab CI/CD can
automate deployments for:
- deploy
deploy_lambda:
stage: deploy
image: amazon/aws-cli
script:
Unset
deploy_gcf:
stage: deploy
image: google/cloud-sdk
script:
How can GitLab CI/CD be used effectively in a monorepo containing multiple services?
Unset
stages:
- build
- deploy
build_backend:
stage: build
script:
fi
build_frontend:
stage: build
script:
fi
How can GitLab CI/CD be used to deploy applications across multiple cloud providers?
Detailed Answer with Example
Multi-cloud deployments distribute applications across AWS, Azure, GCP, or on-premise to increase
reliability and avoid vendor lock-in.
Unset
stages:
- deploy
deploy_aws:
stage: deploy
image: hashicorp/terraform
script:
- terraform init
deploy_azure:
stage: deploy
image: mcr.microsoft.com/azure-cli
script:
✅ Uses Terraform for AWS deployment and Azure CLI for Azure deployment.
What Skills Required to Prepare This Question
How can GitLab CI/CD be used for training and deploying machine learning models?
Machine learning (ML) pipelines involve data processing, model training, and deployment. GitLab
CI/CD can automate:
Unset
stages:
- train
- deploy
train_model:
stage: train
image: tensorflow/tensorflow:latest
script:
- python train.py
- mv model.pkl artifacts/
artifacts:
paths:
- artifacts/model.pkl
deploy_model:
stage: deploy
image: python:3.9
script:
- python deploy.py
How can GitLab CI/CD be used to implement DevSecOps and enhance security in the software
development lifecycle?
DevSecOps integrates security practices into DevOps workflows to catch vulnerabilities early. GitLab
CI/CD provides:
Unset
stages:
- security
sast_scan:
stage: security
image:
registry.gitlab.com/gitlab-org/security-products/analyzers/sast
script:
- /analyzer run
artifacts:
reports:
sast: gl-sast-report.json
dast_scan:
stage: security
image: registry.gitlab.com/gitlab-org/security-products/dast
script:
artifacts:
reports:
dast: gl-dast-report.json
How can GitLab CI/CD be configured for hybrid cloud and on-premise environments?
Detailed Answer with Example
Hybrid cloud setups involve deploying applications across cloud and on-premise infrastructure.
GitLab CI/CD supports:
Unset
stages:
- deploy
deploy_aws:
stage: deploy
script:
deploy_onprem:
stage: deploy
script:
● Experience with hybrid cloud networking (VPN, Direct Connect, VPC Peering).
● Knowledge of GitLab Runners in on-premise environments.
● Understanding of hybrid cloud storage (AWS S3, Azure Blob, Google Cloud Storage).
● Set up GitLab Runner on a private data center and connect to a cloud service.
● Learn about cloud and on-premise networking strategies.
● Study real-world hybrid cloud architectures.
Blockchain applications require smart contract testing, node deployment, and security verification.
GitLab CI/CD can:
Unset
stages:
- test
- deploy
test_smart_contracts:
stage: test
image: node:14
script:
- truffle test
deploy_blockchain_node:
stage: deploy
image: ubuntu:latest
script:
36. GitLab CI/CD for Game Development (Unity, Unreal Engine, Godot)
Question
How can GitLab CI/CD be used for automating game development pipelines?
Game development requires compiling, testing, and packaging large assets. GitLab CI/CD can:
Unset
stages:
- build
- test
- deploy
build_unity:
stage: build
image: unityci/editor:2021.3.0f1
script:
test_unity:
stage: test
script:
stage: deploy
script:
37. GitLab CI/CD for Infrastructure as Code (IaC) with Terraform and Ansible
Question
How can GitLab CI/CD be used to automate Infrastructure as Code (IaC) deployments using Terraform
and Ansible?
GitLab CI/CD can manage infrastructure using Terraform (for provisioning) and Ansible (for
configuration management). A typical workflow involves:
Unset
stages:
- lint
- plan
- apply
- configure
terraform_lint:
stage: lint
image: hashicorp/terraform
script:
- terraform validate
terraform_plan:
stage: plan
script:
- terraform init
terraform_apply:
stage: apply
script:
- terraform apply -auto-approve tfplan
ansible_configure:
stage: configure
image: williamyeh/ansible
script:
● Deploying AWS EC2 instances with Terraform and configuring them with Ansible.
● Managing Kubernetes clusters using Terraform and Helm.
● Automating Azure Virtual Machine deployments using GitLab CI/CD.
How can GitLab CI/CD be used to deploy applications to a Kubernetes (K8s) cluster?
Unset
stages:
- build
- deploy
build_image:
stage: build
image: docker:latest
script:
- docker build -t
registry.gitlab.com/myproject/myapp:$CI_COMMIT_SHA .
deploy_k8s:
stage: deploy
image: bitnami/kubectl
script:
39. GitLab CI/CD for Mobile App Development (Android & iOS)
Question
How can GitLab CI/CD be used for automating mobile app builds and deployments?
Unset
stages:
- build
- test
- deploy
build_android:
stage: build
image: openjdk:11
script:
- ./gradlew assembleRelease
artifacts:
paths:
- app/build/outputs/apk/release/
test_android:
stage: test
script:
- ./gradlew test
deploy_play_store:
stage: deploy
script:
40. GitLab CI/CD for Serverless CI/CD with AWS Lambda and Google Cloud
Functions
Question
How can GitLab CI/CD be used for automating serverless deployments in AWS Lambda and Google
Cloud Functions?
Serverless functions require automated packaging and deployment. GitLab CI/CD can:
Unset
stages:
- package
- deploy
package_lambda:
stage: package
image: python:3.9
script:
stage: deploy
image: amazon/aws-cli
script:
Unset
deploy_gcf:
stage: deploy
image: google/cloud-sdk
script:
How can GitLab CI/CD be used to automate deployments for a microservices-based application?
Microservices architecture consists of independent services, each with its own CI/CD pipeline. GitLab
CI/CD helps:
Example: CI/CD pipeline for deploying microservices using Docker and Kubernetes
Unset
stages:
- build
- deploy
build_microservice:
stage: build
image: docker:latest
script:
- docker build -t
registry.gitlab.com/myproject/service-a:$CI_COMMIT_SHA .
- docker push
registry.gitlab.com/myproject/service-a:$CI_COMMIT_SHA
deploy_microservice:
stage: deploy
image: bitnami/kubectl
script:
How can GitLab CI/CD be used for automating AI/ML model training and deployment?
GitLab CI/CD enables continuous training (CT) and continuous deployment (CD) for ML models,
automating:
Example: CI/CD pipeline for training and deploying an ML model using TensorFlow and AWS
SageMaker
Unset
stages:
- preprocess
- train
- deploy
preprocess_data:
stage: preprocess
image: python:3.9
script:
- python scripts/preprocess.py
train_model:
stage: train
image: tensorflow/tensorflow:latest
script:
- python scripts/train.py
- python scripts/evaluate.py
deploy_model:
stage: deploy
image: amazon/aws-cli
script:
How can GitLab CI/CD be used to manage multi-cloud deployments across AWS, Azure, and Google
Cloud?
- deploy
deploy_aws:
stage: deploy
image: amazon/aws-cli
script:
deploy_azure:
stage: deploy
image: mcr.microsoft.com/azure-cli
script:
deploy_gcp:
stage: deploy
image: google/cloud-sdk
script:
How can GitLab CI/CD be used for managing IoT device firmware updates?
Unset
stages:
- build
- sign
- deploy
build_firmware:
stage: build
image: gcc:latest
script:
- make
sign_firmware:
stage: sign
image: python:3.9
script:
- python scripts/sign_firmware.py
deploy_firmware:
stage: deploy
image: amazon/aws-cli
script:
How can GitLab CI/CD be used to automate security scanning and ensure compliance in DevOps
workflows?
Unset
stages:
- sast
- dast
- dependencies
- container_scan
sast:
stage: sast
image: registry.gitlab.com/gitlab-org/security-products/sast:latest
script:
- /analyzer run
dast:
stage: dast
image: registry.gitlab.com/gitlab-org/security-products/dast:latest
script:
dependency_scan:
stage: dependencies
image:
registry.gitlab.com/gitlab-org/security-products/dependency-scanning:la
test
script:
- /analyzer run
container_scan:
stage: container_scan
image:
registry.gitlab.com/gitlab-org/security-products/container-scanning:lat
est
script:
- /analyzer run
✅✅Detects security issues before deployment.
Ensures compliance with security policies (e.g., OWASP, NIST, PCI-DSS).
How can GitLab CI/CD be used to implement blue-green and canary deployments?
● Blue-Green Deployment: Runs two environments (Blue and Green), switching traffic between
them.
● Canary Deployment: Gradually shifts traffic to the new version to detect issues early.
● Feature Flags: Used for fine-grained control over deployments.
Unset
stages:
- deploy-blue
- deploy-green
- switch-traffic
deploy_blue:
stage: deploy-blue
script:
deploy_green:
stage: deploy-green
script:
switch_traffic:
stage: switch-traffic
script:
How can GitLab CI/CD be optimized for handling monorepos with multiple services?
Unset
stages:
- build
- test
- deploy
build_service_a:
stage: build
script:
only:
changes:
- services/service-a/**
build_service_b:
stage: build
script:
only:
changes:
- services/service-b/**
deploy:
stage: deploy
script:
- ./deploy.sh
only:
changes:
- services/**
How can GitLab CI/CD be used for disaster recovery and backup automation?
Unset
stages:
- backup
- restore
backup_db:
stage: backup
image: postgres:latest
script:
restore_db:
stage: restore
script:
- aws s3 cp s3://my-backup-bucket/backup.sql .
How can GitLab CI/CD be integrated with observability and performance monitoring tools?
- deploy
- monitor
deploy_app:
stage: deploy
script:
monitoring:
stage: monitor
image: prom/prometheus
script:
only:
refs:
- master
How can GitLab CI/CD be enhanced with AI-powered automation and self-healing capabilities?
Unset
stages:
- train
- detect
- recover
train_ai:
stage: train
script:
- python ai_scripts/train_model.py
detect_anomalies:
stage: detect
script:
- python ai_scripts/detect_pipeline_failures.py
auto_recover:
stage: recover
script:
- ./auto-restart.sh
when: on_failure