CI/CD Pipeline
CI/CD Pipeline
Overview
The CLI is stateless: it reads the environment directory, talks to Docker over the socket or SSH, and writes only files in the repository. That makes it suitable for CI jobs with no external services.
Pipeline Outline
- Check out the repository.
- Install the CLI.
- Point the environment at the target: commit
docker.hostinminipaas.yaml, or create the environment during the job. - Create secrets and configs from CI secret variables.
- Build and push images.
- Roll out the stack.
- Apply Caddy routing.
echo "${POSTGRES_PASSWORD}" | minipaas deploy secret prod \
--name postgres_password --for postgres --for api
docker login ghcr.io
minipaas deploy build prod
minipaas deploy rollout prod
minipaas deploy routing prodRequirements
- Registry credentials stored as CI secrets.
deploy buildpushes whenMINIPAAS_IMAGE_PREFIXis set; rollout and canary pass credentials to Swarm with--with-registry-auth. - An SSH key with access to the manager when the environment uses an
ssh://target.
Next Steps
- CLI Usage: environment layout and deploy commands.
- Secrets & Configs: secret and config lifecycle.
- Multiple Environments: isolate dev, staging, and production.