Git Model Versioning¶
When enabled, the Sidecar commits the promoted model's files to a Git repository on each approved promotion — giving you a human-readable, diffable history of governed models alongside the Tower audit trail. It is disabled by default and opted into per deployment.
Optional and best-effort
Git versioning is an extension of the promotion flow, not a gate. When it is disabled or the Git host is unreachable, the step logs and no-ops — the approved promotion still completes. Governance never depends on the Git push succeeding.
How it works¶
On approval, the integration:
- Requests the promoted unit's files from Tower Core through an authenticated callback (the Sidecar holds no model files itself; retrieval is scoped to the workflow's own promotion).
- Commits those files to the configured repository under a folder named after the unit, mirroring the package contents (for example,
MyUnit/loan_pre_qualification.dmn). - Makes the unit folder reflect exactly the promoted package — files removed from the model are removed from the folder, while the rest of the repository is left untouched.
- Returns the commit reference, which is included in the promotion-completion message.
The unit folder is the unit of history: each promotion overwrites it, and the version-to-version history lives in the Git log.
How to enable Git versioning¶
Turn on the integration for a deployment.
Prerequisites:
- A Git repository to receive the commits, in
owner/repoform. - An access token with Contents: read and write on that repository.
Provide the token through a secret, never in an image
Supply …GITHUB_TOKEN only through your secret manager / environment. A token committed to a repository will be detected and revoked by the Git host.
Steps:
- Set the Git variables on the Sidecar (see Configuration):
ALETYX_DC_TOWER_SIDECAR_GITHUB_ENABLED=trueALETYX_DC_TOWER_SIDECAR_GITHUB_TOKEN=<token>ALETYX_DC_TOWER_SIDECAR_GITHUB_REPO=<owner/repo>ALETYX_DC_TOWER_SIDECAR_GITHUB_BRANCH=<branch>(defaults tomain)- Optionally
…GITHUB_COMMITTER_NAME/…GITHUB_COMMITTER_EMAIL.
- Restart the Sidecar so it picks up the new configuration.
Verify: Approve a test promotion, then confirm a new commit appears on the target branch with the unit's files under the unit folder, and that the promotion-completion message includes the commit reference.
How to disable Git versioning¶
Stop committing without removing the rest of the configuration.
Steps:
- Set
ALETYX_DC_TOWER_SIDECAR_GITHUB_ENABLED=false(or leave it unset). - Restart the Sidecar.
Verify: Approved promotions complete normally, the completion message reports no commit, and no calls are made to the Git host.
Troubleshooting¶
| Symptom | Likely cause |
|---|---|
| Completion message shows no commit | …GITHUB_ENABLED is false, or the token/repo is unset. |
| Commit step logs an authorization error | Token lacks Contents: read and write on the target repository, or was revoked. |
| Files land in the wrong place | The unit name resolves to an unexpected folder; confirm the promotion's unit. |
| Nothing committed for a unit | The promoted package contained no files; check the source environment's version. |
Credentials hygiene
Rotate the access token periodically and whenever it may have been exposed. Because the integration is per-deployment, different environments can use separate tokens scoped to different repositories.