Passer au contenu

Introduction to CI/CD

Le contenu de cette page n'est pas encore traduit dans votre langue. Vous pouvez consulter la version originale en anglais.

CI/CD stands for Continuous Integration and Continuous Deployment. It is a fundamental practice in modern DevOps workflows that focuses on automating the building, testing, and deployment of code whenever changes are pushed to a version control system like Git.

CI/CD brings several advantages to infrastructure and software projects:

  • Automation — Replaces manual steps with automated pipelines
  • Speed — Accelerates feedback and deployment loops
  • Reliability — Reduces the risk of human error
  • Consistency — Ensures changes are applied the same way every time
  • Collaboration — Allows teams to work more efficiently with shared workflows

In this homelab project, CI/CD is used to automatically rebuild and deploy the NixOS configuration and the containerized services whenever changes are made to the configuration files in the Git repository.

This means:

  • Any update to configuration.nix or related files is instantly picked up
  • A GitHub Actions pipeline validates the configuration and applies it
  • The remote NixOS VM is updated without needing to log in manually

This approach is crucial for maintaining a declarative, reproducible, and hands-off infrastructure environment.

  • GitHub Actions — Used to trigger workflows when commits are pushed
  • OpenSSH — Securely connects to the remote NixOS machine
  • nixos-rebuild — Rebuilds the system from the updated configuration
  • Tailscale Github Action — Used to connect to the NixOS VM over a secure mesh network

Learn More