DevOpsGenDOCSGitHub

command reference

devopsgen validate

Statically lint DevOpsGen output — Dockerfiles, GitHub Actions workflows and Kubernetes manifests — so problems surface on your laptop instead of pipeline number forty.

devopsgen validate passing with the message internal validation passed and exit code 0
Everything checks out — exit code 0.
synopsis
devopsgen validate [flags]          # validate the current project
devopsgen validate --output-dir ./configs

What it checks

Docker

  • FROM instruction is present
  • no docker login (credentials) inside image builds
  • COPY/ADD free of shell chaining (&&, ||, 2>/dev/null)

GitHub Actions

  • parses as a single workflow document with name, on, jobs and steps
  • a actions/checkout step exists
  • the image push references the commit SHA tag
  • no unrendered template actions leak into the output

Kubernetes

  • Deployment: selector ↔ template label consistency, unique container names, integer containerPort in 1–65535
  • Service: selector plus port/targetPort pairs
  • Ingress: networking.k8s.io/v1, valid pathType, wired backend.service
  • Service ↔ Ingress backends stay consistent

Exit behaviour

Combine with devopsgen init in CI: generate, commit, validate, deploy — the exit codes page maps every failure class.

Combine with devopsgen init in CI: generate, commit, validate, deploy — the exit codes page maps every failure class.