Cleaner production
Production stops behaving like a mutable working tree. The live system becomes a deliberate activated release instead of a branch state.
A professional release strategy for AME by Zentra built from the supplied plan, workflow, safety, and Bitbucket governance notes — styled in a dark Zentra presentation format.
Atomic switch. New releases activate cleanly instead of live in-place updates. Fast rollback. Previous release activation stays available if the new release is bad.
A professional release strategy for AME by Zentra built from the supplied plan, workflow, safety, and Bitbucket governance notes.
Goal: move from branch-based deploys to a tracked release model with atomic cutover and fast rollback.
The supplied strategy recommends replacing direct branch-based deploys with tracked, named releases so every production change is clearer, safer, and easier to reverse.
Production stops behaving like a mutable working tree. The live system becomes a deliberate activated release instead of a branch state.
Rollback becomes an operational switch back to the previous release rather than manual shell work on the live server.
Each release records the version, commit, branch, deploy time, hooks, migrations, and checkpoint references.
The current pattern mixes code, cache, workers, and migrations directly in the live path. That makes it harder to know what is actually live and slower to recover when something goes wrong.
The deployed unit should be a tracked release, not an untracked branch state.
The supplied branch model keeps feature work moving into staging first, then promotes only intentional, production-ready commits into the release branch.
Integration branch for staging validation.
Production release branch for releases and controlled hotfixes.
Developers shape the patch on feature branches before anything touches the release path.
Reviewed work lands in stg-250226 so the integrated patch can be seen as one story.
CI, QA, and staging checks confirm the exact candidate before promotion.
The approved commit is promoted into fix/production-2026 with no ambiguity about what ships.
The pipeline assembles one immutable release package and prepares the exact deployable unit.
Hooks, caches, and readiness checks run away from the live tree before activation.
Production switches to the new release cleanly, with the previous release still ready if needed.
Plain English: the release path is shown as a compact sequence: feature work enters staging, the exact commit is promoted, then one release is built, checked, and activated.
open release
A release is not “whatever is currently on the branch”. It is a built package with metadata, hooks, and a known rollback point.
{
"version": "2026.03.7",
"build": "2026.03.7+abc1234",
"commit": "abc1234",
"branch": "fix/production-2026",
"requires_migration": true,
"hooks": [
"php artisan migrate --force",
"php artisan localization:property-types-prewarm"
]
}
Production should point to a symlink. When a release is ready, deployment changes the pointer from the old release to the new one. If the release is bad, switch back.
Rollback should be boring.
The goal is simple: every change should be reviewable, every deploy reproducible, and every release rollback-ready.
stg-250226fix/production-2026The pipeline model is safer because it separates preparing a release, validating a release, and activating a release.
Block direct pushes, force pushes, deletes, and unreviewed merges.
Require approvals, green pipeline, and no unresolved tasks.
Only approved branches deploy to each environment.
Each release is built in its own directory and never edited after activation.
Create a checkpoint or dump before production cutover.
Run lint, dependencies, migration readiness, cache rebuild, and smoke checks.
Confirm key routes, workers, and logs are healthy after activation.
Switch back quickly and restore DB only if necessary.
Why this is safer than pulling directly on prod: direct server pulls mix code changes, cache changes, migrations, worker restarts, and environment assumptions inside the live application path.
The intention is to enforce the release model with Bitbucket rules, deployment restrictions, and merge checks — not by relying on people to remember the right steps.
Use for integration and staging validation.
Use for production releases and controlled hotfixes.
Release governance is strongest when settings are managed and every production change leaves a record that can be reviewed later.
BITBUCKET_USERNAME BITBUCKET_APP_PASSWORD PRODUCTION_BRANCH=fix/production-2026 STG_BACKMERGE_TARGET_BRANCH=stg-250226 production deploy SSH secrets staging deploy SSH secrets
Why manage settings through API-backed scripts? Repeatability, auditability, and easier rebuild if repo settings are lost.
The release model improves day-to-day operations, makes incidents easier to understand, and reduces dependence on one person remembering special deploy steps.
Instead of changing the live car while customers are looking at it, we prepare a complete new version in the garage, test it, then swap it in cleanly. If the new car has a problem, the previous one goes straight back on display.
This strategy gives AME by Zentra a corporate-grade release process that is safer, cleaner, and easier to operate long term.