29.04.2025

CI/CD cheat sheet for DevOps engineer

CI/CD (Continuous Integration / Continuous Delivery / Deployment) is a practice of automating the building, testing, and deployment of applications.

Key Concepts

Typical CI/CD Pipeline Structure

  1. Build – compiling the project
  2. Test – running unit and integration tests
  3. Lint – code style and syntax checks
  4. Package – creating an artifact (.jar, Docker image, etc.)
  5. Deploy – deploying to a server or cluster

Popular CI/CD Tools

Tool Description
Jenkins Classic automation server
GitLab CI Built-in CI/CD for GitLab
GitHub Actions Automation via GitHub workflows
ArgoCD GitOps tool for Kubernetes
Drone CI Lightweight CI for Docker environments

Example .gitlab-ci.yml

stages:
- build
- test
- deploy

build:
stage: build
script:
- echo "Building the project..."
- make build

test:
stage: test
script:
- echo "Running tests..."
- make test

deploy:
stage: deploy
script:
- echo "Deploying application..."
- make deploy
only:
- main

Common CI/CD Commands

Command Purpose
docker build Build a Docker container
docker push Push an image to a registry
kubectl apply -f Apply a Kubernetes manifest
helm upgrade Deploy or update an app in Kubernetes
ansible-playbook Execute deployment playbooks

CI/CD Pipeline Best Practices

Quick Stage Examples

Build Stage (Python):

pip install -r requirements.txt
python setup.py sdist

Test Stage (Node.js):

npm install
npm test

Deploy Stage (Docker + Kubernetes):

docker build -t myapp:latest .
docker push myregistry/myapp:latest
kubectl rollout restart deployment myapp-deployment

Mini CI/CD Engineer Checklist

✅ Validate the CI configuration syntax
✅ Ensure all tests pass
✅ Properly configure secrets
✅ Separate environments (dev / stage / prod)
✅ Test rollback functionality

Serverspace and CI/CD

Want to simplify your CI/CD setup and always have reliable infrastructure at your fingertips? With Serverspace, you can deploy virtual machines in just a few minutes, automate application delivery using a powerful API, and scale your infrastructure effortlessly to meet growing demand. Whether you're building from scratch or migrating an existing project, Serverspace offers flexible tools and support to make the transition smooth and secure. Plus, thanks to a rich Cloud Marketplace, you can launch pre-configured environments — including Docker, Kubernetes, GitLab, and other popular DevOps tools — with a single click. It’s an ideal solution for developers and teams who want to focus on delivery, not infrastructure. Try Serverspace and supercharge your CI/CD and DevOps workflows today!