No description
  • Python 99.9%
  • Dockerfile 0.1%
Find a file
simon 5e544e841d
All checks were successful
CI / test (push) Successful in 1m2s
Publish Docker Image / publish-image (push) Successful in 1m45s
Merge pull request 'fix(release): publish distinct dev image tags' (#46) from fix/dev-image-version into main
Reviewed-on: #46
2026-06-21 18:03:34 +00:00
.forgejo/workflows fix(release): publish distinct dev image tags 2026-06-21 19:02:02 +01:00
docs feat(projects): add staged repository workspace commits 2026-06-21 16:38:16 +01:00
src/ct_automation Merge pull request 'fix(projects): honor playbook folder sync overrides' (#45) from fix/sync-playbook-folder into main 2026-06-21 16:44:20 +01:00
tasks fix(release): publish distinct dev image tags 2026-06-21 19:02:02 +01:00
tests fix(release): publish distinct dev image tags 2026-06-21 19:02:02 +01:00
.env.example feat(worker): add runtime entrypoint 2026-06-01 21:28:07 +00:00
.gitignore feat: scaffold service stack 2026-05-26 22:15:45 +01:00
AGENTS.md docs: bootstrap ct-automation planning 2026-05-26 21:39:06 +01:00
Dockerfile fix(worker): install ansible playbook runtime 2026-06-01 21:38:47 +00:00
pyproject.toml fix(release): publish distinct dev image tags 2026-06-21 19:02:02 +01:00
README.md ci(images): publish development tags before production promotion 2026-06-17 08:41:05 +00:00

CT-Automation

CT-Automation is the standalone CarrTech automation product. Its first automation engine is Ansible, and its first UI/client is the CT-Ops integration, but the product must be designed so it can later ship with its own dedicated UI and operate without CT-Ops.

The current repository starts as the product architecture, API contract, and agent task backlog. Implementation should happen here once the initial service scaffold is created.

Product Direction

CT-Automation owns:

  • automation projects and Git sync
  • inventories and inventory sources
  • credentials and secret references
  • job templates
  • playbook execution
  • event streams, artifacts, reports, and audit records
  • schedules, approvals, RBAC, and policy

CT-Ops is one integrating client. CT-Ops may provide managed host inventory, launch automation, and show summaries or embedded views, but CT-Automation is the system of record for automation.

Important Documents

Agent Workflow

Agents should read AGENTS.md and tasks/README.md, claim exactly one task from tasks/backlog/, commit and push the claim, complete that task, then mark it complete with validation notes.

The backlog is intentionally split into small jobs so scheduled agents can pick up one task at a time without duplicating work.

Service Scaffold

CT-Automation is scaffolded as a Python 3.12 service with separate API and worker packages under src/ct_automation. The intended production stack is FastAPI, SQLAlchemy, Alembic, PostgreSQL, Ansible Runner, Pytest, Ruff, and a containerized runtime. Runtime dependencies are introduced by the task that first needs each concrete behavior.

Local smoke check:

PYTHONPATH=src python -m ct_automation smoke

Run the test harness:

python -m pip install -e ".[dev]"
python -m pytest

Run the dependency-free migration smoke check:

PYTHONPATH=src python -m ct_automation migrate-smoke

Compile the scaffold:

python -m compileall src

Build the container image:

docker build -t ct-automation:dev .

Run the container API:

docker run --rm -p 8080:8080 ct-automation:dev

Then open http://localhost:8080/healthz.

Container Publishing

Forgejo Actions publishes docker.io/carrtechdev/ct-automation from the Publish Docker Image workflow on pushes to main. The workflow publishes the repository version from pyproject.toml as a development tag, for example dev-0.1.0.

After testing that development image, run the Promote Docker Image workflow with the same version number to retag the exact same digest as the production tags, for example 0.1.0 and latest. Production deployments should use the versioned production tag, latest, or the digest behind that tag.

Required Forgejo Actions secrets:

  • DOCKERHUB_USERNAME
  • DOCKERHUB_TOKEN