Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/web/dist/exit-codes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
<meta property="og:url" content="https://bangkahdev.github.io/DevOpsGen/exit-codes/" />
<meta property="og:title" content="Exit codes — DevOpsGen Docs" />
<meta property="og:description" content="Every devopsgen command exits with a documented status code: 0 success, 1 general error, 2 invalid configuration, 3 file conflicts, 4 validation failure, 5 ambiguous detection." />
<meta property="og:image" content="https://bangkahdev.github.io/DevOpsGen/img/invalid-config.png" />
<meta property="og:image" content="https://bangkahdev.github.io/DevOpsGen/img/validate.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Exit codes — DevOpsGen Docs" />
<meta name="twitter:description" content="Every devopsgen command exits with a documented status code: 0 success, 1 general error, 2 invalid configuration, 3 file conflicts, 4 validation failure, 5 ambiguous detection." />
<meta name="twitter:image" content="https://bangkahdev.github.io/DevOpsGen/img/invalid-config.png" />
<meta name="twitter:image" content="https://bangkahdev.github.io/DevOpsGen/img/validate.png" />
<link rel="stylesheet" crossorigin href="../assets/site.css" />
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication","name":"DevOpsGen","applicationCategory":"DeveloperApplication","operatingSystem":"Linux, Windows, macOS","description":"Every devopsgen command exits with a documented status code: 0 success, 1 general error, 2 invalid configuration, 3 file conflicts, 4 validation failure, 5 ambiguous detection.","url":"https://bangkahdev.github.io/DevOpsGen/","offers":{"@type":"Offer","price":"0","priceCurrency":"USD"}},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://bangkahdev.github.io/DevOpsGen/"},{"@type":"ListItem","position":2,"name":"exit codes","item":"https://bangkahdev.github.io/DevOpsGen/exit-codes/"}]}]}</script>
</head>
<body>
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link" href="../detect/">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link is-active" href="../exit-codes/" aria-current="page">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">ci integration</p><h1>Exit codes</h1><p class="lede">Every DevOpsGen command exits with a stable, documented status code so shells, scripts and CI jobs can branch deterministically — no output parsing required.</p></header><div class="table-wrap"><table><thead><tr><th>Code</th><th>Classification</th><th>Meaning</th><th>Typical example</th></tr></thead><tbody><tr><td class="num">0</td><td><span class="badge badge-ok">success</span></td><td>Everything requested completed; dry-run plans that resolved cleanly also end here.</td><td><code>init</code> created 5 files; <code>--dry-run --force</code> plan is green.</td></tr><tr><td class="num">1</td><td><span class="badge badge-err">general error</span></td><td>Unexpected failure — I/O errors, template issues, or a run that failed mid-write and rolled back.</td><td>Disk full while writing <code>deployment.yaml</code>.</td></tr><tr><td class="num">2</td><td><span class="badge badge-err">invalid input</span></td><td>Configuration failed validation before anything was planned or written.</td><td><code>--image BANGKAH/my-app</code>; port <code>-1</code>; Ingress without host.</td></tr><tr><td class="num">3</td><td><span class="badge badge-warn">conflict</span></td><td>Target files already exist and would be overwritten; nothing was written. Retried with <code>--force</code>.</td><td>Second <code>init</code> without <code>--force</code>.</td></tr><tr><td class="num">4</td><td><span class="badge badge-err">validation failed</span></td><td>Rejected output: a template rendering failure, required artifacts missing, or generated documents failing the static lint rules.</td><td>A workflow that never publishes the commit SHA tag.</td></tr><tr><td class="num">5</td><td><span class="badge badge-warn">detection</span></td><td>Stack detection was ambiguous or found nothing at all.</td><td>Empty directory without <code>go.mod</code> / <code>package.json</code>.</td></tr></tbody></table></div><h2>In practice</h2><div class="screen-strip"><figure class="shot "><a href="../img/invalid-config.png" target="_blank" rel="noopener noreferrer"><img src="../img/invalid-config.png" alt="devopsgen exiting with code 2 after failing image validation" loading="lazy" decoding="async"/></a><figcaption>Exit 2 — config rejected before planning.</figcaption></figure><figure class="shot "><a href="../img/init-conflict.png" target="_blank" rel="noopener noreferrer"><img src="../img/init-conflict.png" alt="devopsgen exiting with code 3 on existing files" loading="lazy" decoding="async"/></a><figcaption>Exit 3 — conflict, nothing written.</figcaption></figure></div><div class="code-block"><span class="code-label">shell script branching</span><pre><code>devopsgen init --stack go --registry ghcr --image you/myapp --port 8080
<a class="skip" href="#main">skip to content</a><header class="topbar"><a class="brand" href="../"><span class="brand-mark">DG</span><span class="brand-name">DevOpsGen</span><span class="brand-sub">DOCS</span></a><a class="gh-pill" href="https://github.com/Bangkahdev/DevOpsGen" rel="noopener noreferrer" target="_blank">GitHub</a></header><div class="shell"><aside class="sidebar" aria-label="Documentation navigation"><a class="side-link side-home" href="../">Home</a><div class="side-group"><p class="group-label">Overview</p><ul><li><a class="side-link" href="../getting-started/">getting started</a></li><li><a class="side-link" href="../wizard/">wizard</a></li></ul></div><div class="side-group"><p class="group-label">Command reference</p><ul><li><a class="side-link" href="../init/">init</a></li><li><a class="side-link" href="../detect/">detect</a></li><li><a class="side-link" href="../validate/">validate</a></li></ul></div><div class="side-group"><p class="group-label">Operations</p><ul><li><a class="side-link is-active" href="../exit-codes/" aria-current="page">exit codes</a></li></ul></div></aside><main id="main"><header class="page-head"><p class="kicker">ci integration</p><h1>Exit codes</h1><p class="lede">Every DevOpsGen command exits with a stable, documented status code so shells, scripts and CI jobs can branch deterministically — no output parsing required.</p></header><div class="table-wrap"><table><thead><tr><th>Code</th><th>Classification</th><th>Meaning</th><th>Typical example</th></tr></thead><tbody><tr><td class="num">0</td><td><span class="badge badge-ok">success</span></td><td>Everything requested completed; dry-run plans that resolved cleanly also end here.</td><td><code>init</code> created 5 files; <code>--dry-run --force</code> plan is green.</td></tr><tr><td class="num">1</td><td><span class="badge badge-err">general error</span></td><td>Unexpected failure — I/O errors, template issues, or a run that failed mid-write and rolled back.</td><td>Disk full while writing <code>deployment.yaml</code>.</td></tr><tr><td class="num">2</td><td><span class="badge badge-err">invalid input</span></td><td>Configuration failed validation before anything was planned or written.</td><td><code>--image BANGKAH/my-app</code>; port <code>-1</code>; Ingress without host.</td></tr><tr><td class="num">3</td><td><span class="badge badge-warn">conflict</span></td><td>Target files already exist and would be overwritten; nothing was written. Retried with <code>--force</code>.</td><td>Second <code>init</code> without <code>--force</code>.</td></tr><tr><td class="num">4</td><td><span class="badge badge-err">validation failed</span></td><td>Rejected output: a template rendering failure, required artifacts missing, or generated documents failing the static lint rules.</td><td>A workflow that never publishes the commit SHA tag.</td></tr><tr><td class="num">5</td><td><span class="badge badge-warn">detection</span></td><td>Stack detection was ambiguous or found nothing at all.</td><td>Empty directory without <code>go.mod</code> / <code>package.json</code>.</td></tr></tbody></table></div><h2>In practice</h2><figure class="shot shot-feature"><a href="../img/validate.png" target="_blank" rel="noopener noreferrer"><img src="../img/validate.png" alt="devopsgen validate reporting internal validation passed with exit code 0" loading="lazy" decoding="async"/></a><figcaption>Exit 0 — internal validation passed.</figcaption></figure><div class="code-block"><span class="code-label">shell script branching</span><pre><code>devopsgen init --stack go --registry ghcr --image you/myapp --port 8080
case $? in
0) echo &quot;ready&quot; ;;
3) devopsgen init --force --stack go --registry ghcr --image you/myapp --port 8080 ;;
Expand Down
Binary file modified docs/web/dist/img/dry-run.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/web/dist/img/init-conflict.png
Binary file not shown.
Binary file removed docs/web/dist/img/invalid-config.png
Binary file not shown.
Loading
Loading