nhance/app/Views/docs/cicd.php
2026-05-18 12:28:19 +05:30

80 lines
2.3 KiB
PHP

<?php
/**
* CI/CD Pipeline - content only
* app/Views/docs/cicd.php
*/
?>
<p>
The current CI/CD setup is split by environment. Dev uses webhook-driven
deployment and supporting asset publish scripts, while UAT and live use a
controlled branch-promotion plus server-side deployment flow.
</p>
<h2 id="overview">Overview</h2>
<div class="mermaid-wrapper">
<div class="mermaid">
flowchart TD
A[Code pushed] --> B{Target environment}
B --> C[DEV flow]
B --> D[UAT/LIVE flow]
C --> E[Bitbucket webhook to cPanel]
E --> F[deploy.php]
F --> G[deploy.sh]
G --> H[Optional asset publish to S3 + CloudFront]
D --> I[auto_merge.py]
I --> J[Environment deployment scripts]
</div>
</div>
<h2 id="dev-pipeline">Dev pipeline</h2>
<p>
In dev, deployment is handled by Bitbucket webhook integration with cPanel.
A custom PHP receiver triggers the deployment shell script, and the shell
script also sends a Cliq notification after the deployment result is known.
</p>
<p>
For frontend or static asset publishing, the team also uses a separate
S3 + CloudFront batch workflow documented on the <code>S3 &amp; CloudFront</code>
page.
</p>
<h2 id="uat-live-flow">UAT and live flow</h2>
<p>
For UAT and live, branch movement is not push-triggered. The standard order is
<code>dev -> test -> uat -> live</code> through <code>auto_merge.py</code>,
followed by the relevant environment deployment shell scripts on the server.
</p>
<div class="callout warning">
<span>!</span>
<div>
<strong>Manual prerequisites still apply</strong>
DB changes, environment variable updates, and other environment-specific
release tasks must still be handled manually before the final deployment
scripts are executed.
</div>
</div>
<h2 id="related-docs">Related docs</h2>
<table>
<thead>
<tr><th>Page</th><th>What it covers</th></tr>
</thead>
<tbody>
<tr>
<td><a href="<?= base_url('docs/deployment') ?>">Deployment</a></td>
<td>cPanel dev deployment, branch promotion, merge helper, and UAT/live code move steps.</td>
</tr>
<tr>
<td><a href="<?= base_url('docs/s3-cloudfront') ?>">S3 &amp; CloudFront</a></td>
<td>Dev batch script for S3 upload and CloudFront invalidation.</td>
</tr>
</tbody>
</table>