DevOpsGenDOCSGitHub

ci integration

Exit codes

Every DevOpsGen command exits with a stable, documented status code so shells, scripts and CI jobs can branch deterministically — no output parsing required.

CodeClassificationMeaningTypical example
0successEverything requested completed; dry-run plans that resolved cleanly also end here.init created 5 files; --dry-run --force plan is green.
1general errorUnexpected failure — I/O errors, template issues, or a run that failed mid-write and rolled back.Disk full while writing deployment.yaml.
2invalid inputConfiguration failed validation before anything was planned or written.--image BANGKAH/my-app; port -1; Ingress without host.
3conflictTarget files already exist and would be overwritten; nothing was written. Retried with --force.Second init without --force.
4validation failedRejected output: a template rendering failure, required artifacts missing, or generated documents failing the static lint rules.A workflow that never publishes the commit SHA tag.
5detectionStack detection was ambiguous or found nothing at all.Empty directory without go.mod / package.json.

In practice

devopsgen validate reporting internal validation passed with exit code 0
Exit 0 — internal validation passed.
shell script branching
devopsgen init --stack go --registry ghcr --image you/myapp --port 8080
case $? in
  0) echo "ready" ;;
  3) devopsgen init --force --stack go --registry ghcr --image you/myapp --port 8080 ;;
  2) echo "fix your flags" >&2 ;;
  *) echo "see devopsgen validate output" >&2 ;;
esac
Codes are part of DevOpsGen's compatibility promise: bumping a major version may add new codes, but existing ones keep their meaning.