Skip to content

M3b part 1: commit-tagged Azure images, M3a config in Azure, path-filtered CI, Deploy workflow - #12

Merged
MAOFILHO merged 2 commits into
mainfrom
m3b/pipeline-azure
Nov 15, 2026
Merged

MAOFILHO merged 2 commits into
mainfrom
m3b/pipeline-azure

Conversation

@MAOFILHO

Copy link
Copy Markdown
Owner

Part 1 of M3b (see "M3 review" in docs/PLAN.md, decision 4). Closes #5, closes #6, closes #9. Refs #7 (one later PR still has to show the skipped jobs) and #8 (a human ticket: this PR ships the script, and the owner runs it).

What it does

  • M3b: Azure images tagged with the commit they were built from #5: Azure images are tagged with the 12-character commit and carry it as GIT_SHA. The registry is no longer built for Azure.
  • M3b: Azure configuration for the M3a features (Redis, inventory address, signing key) #6: Azure now has what the M3a features need:
    • Redis as an internal TCP Container App, kept at 1 replica, so the event bus works.
    • REDIS_URL for order and inventory, and the inventory address for order. Without that address, checkout's stock-hold step would fail in Azure.
    • A signing key that provision generates and then keeps across re-runs, so nobody is logged out.
    • make resume keeps Redis at exactly 1 replica.
    • Cost record updated: left running for 30 days, the total can now pass the $25 alert.
  • M3b: CI runs only what a change touches #7: pull requests run only the suites and images a change touches. The plan comes from the service table (scripts/ci_changes.py). One always-run job, CI ok, is the check to require if branch protection is added.
  • M3b: Azure identity for GitHub Actions (owner takes part) #8: make github-identity (the owner runs it):
    • An OIDC identity that only this repo's main branch can use, limited to rg-microservices-12-patterns.
    • Its 3 ids are stored as GitHub secrets, so they stay masked in public logs.
    • make provision grants its role again after each teardown.
  • M3b: Deploy button (manual GitHub workflow to Azure) #9: a manual Deploy workflow, on main only, with every action pinned to a commit. It rebuilds the services whose code changed since the commit they run, rolls them out, waits until each one answers with the new commit, and records image size.

Review

Matt Pocock code review on both axes found 13 standards findings and 9 spec findings. All were fixed, each with a failing test first except 2 steps that only exist in the workflow (see the commit message).

Tests

  • 149 unit tests, 60 of them in the repo-root suite.
  • The template compiles with no warnings.
  • 23 local smoke tests pass.
  • Nothing has touched Azure or GitHub settings yet.

🤖 Generated with Claude Code

MAOFILHO and others added 2 commits November 15, 2026 18:06
…ath-filtered CI, Deploy workflow

- #5: provision tags every Azure image with the 12-char commit and passes it in as GIT_SHA; the
  registry is no longer built for Azure.
- #6: Redis as an internal TCP Container App (1 replica, imported into ACR), REDIS_URL for order and
  inventory, the inventory address for order, and a provision-generated signing key stored as a
  Container Apps secret. make resume keeps Redis at exactly 1 replica. Cost record updated.
- #7: scripts/ci_changes.py turns the changed files into CI matrices from the service table; PRs run
  only what they touch, main runs everything.
- #8: make github-identity (owner runs it): OIDC app registration limited to this repo's main
  branch and the project resource group; ids stored as masked GitHub secrets; provision re-grants
  the role after each teardown.
- #9: manual Deploy workflow (main only, actions pinned to SHAs): rebuilds services whose code
  changed since their running commit, rolls them out, records image size, shown on the
  Containerization page.

All logic built test-first (implement skill): 42 repo-root tests, 131 unit tests in all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two-axis review (standards + spec against #5-#9). Fixes, each with a failing test first except the
two workflow-only steps (Deploy health wait, CI ok job), which the Azure run (#11) proves:

- One source: services Azure runs, their folders and the resource group come from the service
  table (azure/shared flags); Deploy reads them through deploy_plan.py instead of hardcoding.
- provision --skip-build reuses the last built tag instead of pointing apps at a tag never pushed;
  re-runs keep the signing key (no logout); provision records image sizes for the page.
- CI: pytest.ini runs everything; an unknown pact provider fails loudly; Deploy ignores CI-only
  files; a multi-platform manifest reports unknown size instead of crashing.
- Identity: role granted by object id (no replication race), exact app-name match, GitHub secrets
  written only when missing or after a new app.
- Deploy waits until each service answers with the new commit, else fails the run.
- CI: actions pinned to SHAs, base branch passed via env, one always-run "CI ok" job to require.
- Redis no longer receives the MySQL secret; its no-password scope is documented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MAOFILHO
MAOFILHO merged commit de4e8b5 into main Nov 15, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant