Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc435bb7eb | ||
|
|
e4500339b4 | ||
|
|
7f85781879
|
||
|
|
d76a46ce11 | ||
|
|
18ea857841
|
||
|
|
ee31744cb9 | ||
|
|
73c3d4d753
|
||
|
|
81ac29eec4 | ||
|
|
19192d07a5 |
No files matched your search
@@ -29,7 +29,7 @@ GitHub Issues (org: KofTwentyTwo). Commit format: `feat(#N): description` or `Cl
|
||||
|
||||
- Namespace: `kof22`
|
||||
- Orb: `kof22/munitor`
|
||||
- Latest stable: `kof22/munitor@0.3.3`
|
||||
- Latest stable: `kof22/munitor@0.3.11`
|
||||
- Dev snapshot: `kof22/munitor@dev:snapshot`
|
||||
|
||||
`0.3.0` includes first-class pnpm support, repository-owned Dockerfiles for
|
||||
|
||||
@@ -6,7 +6,7 @@ Latin: *munitor* (fortifier, protector) -- KofTwentyTwo's unified CircleCI orb f
|
||||
| --- | --- |
|
||||
| **Tier** | Internal until classified -- listed under *Awaiting classification* in the KofTwentyTwo standards [MAINTAINERS.md](https://github.com/KofTwentyTwo/standards/blob/main/MAINTAINERS.md); Product-tier requirements are being adopted |
|
||||
| **Standards** | Targets [KofTwentyTwo standards](https://github.com/KofTwentyTwo/standards) 1.0.0 |
|
||||
| **Orb** | [`kof22/munitor`](https://circleci.com/developer/orbs/orb/kof22/munitor), latest stable `0.3.10` |
|
||||
| **Orb** | [`kof22/munitor`](https://circleci.com/developer/orbs/orb/kof22/munitor), latest stable `0.3.11` |
|
||||
| **Security** | [SECURITY.md](SECURITY.md) |
|
||||
| **Contributing** | [CONTRIBUTING.md](CONTRIBUTING.md) |
|
||||
|
||||
@@ -77,9 +77,9 @@ replace that repository's required-check list with the verified aggregate gate,
|
||||
preserving all other branch rules. A single adoption PR may update both orb pins
|
||||
and enable `ci.docs_only`: those config changes force full CI. Verify the gate
|
||||
and migrate required checks before merging it or opening a docs-only PR. Munitor's
|
||||
own native no-op gate is expected to report `ci/circleci: lint-pack/ci-ready`;
|
||||
verify its actual context before changing its rules. Release and real-context
|
||||
verification are still pending; see [the adoption plan](docs/PLAN-agile-ci.md).
|
||||
own native no-op gate reports `ci/circleci: lint-pack/ci-ready`. Both features
|
||||
ship in 0.3.11. Verify each consumer's actual successful context before changing
|
||||
its rules; see [the adoption record](docs/PLAN-agile-ci.md).
|
||||
|
||||
Use native [Website-Backend Insights](https://app.circleci.com/insights/github/KofTwentyTwo/Website-Backend/workflows),
|
||||
[PR timings](https://app.circleci.com/insights/github/KofTwentyTwo/Website-Backend/workflows/pr-checks),
|
||||
@@ -111,16 +111,16 @@ would not receive that exemption.
|
||||
|
||||
Munitor is a public CircleCI orb: any CircleCI organization can use it without forking. This checklist covers what a new consumer needs, for example a Java/Maven web service. A QQQ application should also read the [QQQ adoption checklist](https://github.com/QRun-IO/qqq/blob/develop/docs/migration/adoption-checklist.adoc) (section 7 covers release tooling).
|
||||
|
||||
**Version.** Use `kof22/munitor@0.3.10` (or `@0.3` to float on the 0.3 line) in `.circleci/config.yml`, and the same value as `orb_version` in `.munitor.yml`. Keep the setup orb and the generated pipeline on the same line.
|
||||
**Version.** Use `kof22/munitor@0.3.11` (or `@0.3` to float on the 0.3 line) in `.circleci/config.yml`, and the same value as `orb_version` in `.munitor.yml`. Keep the setup orb and the generated pipeline on the same line.
|
||||
|
||||
### 1. Repository files
|
||||
|
||||
- `.circleci/config.yml`: the setup config from [Quick Start](#quick-start), pinned to `kof22/munitor@0.3.10`.
|
||||
- `.circleci/config.yml`: the setup config from [Quick Start](#quick-start), pinned to `kof22/munitor@0.3.11`.
|
||||
- `.munitor.yml`: pick a [pipeline type](#pipeline-types). A Java service is `java-webapp`. KofTwentyTwo's Website-Backend is a working example; a generalized version:
|
||||
|
||||
```yaml
|
||||
pipeline: java-webapp
|
||||
orb_version: "0.3.10"
|
||||
orb_version: "0.3.11"
|
||||
image_name: my-service
|
||||
java_version: "21"
|
||||
docker:
|
||||
|
||||
+21
-6
@@ -1,8 +1,11 @@
|
||||
# Agile CI adoption
|
||||
|
||||
Implemented locally: an opt-in `java-webapp` docs-only workflow, aggregate consumer
|
||||
gate, and native no-op gate for Munitor's own checks. Publication, real check-context
|
||||
verification, required-check migration and consumer opt-in remain pending.
|
||||
Released as 0.3.10: opt-in documentation-only Java CI and aggregate merge results.
|
||||
PR48 implemented it; PR49 released main 19192d07, signed tag v0.3.10 published,
|
||||
and PR50 back-merged to develop 81ac29ee. All hosted checks passed. Munitor's
|
||||
actual `ci/circleci: lint-pack/ci-ready` now protects main/develop; unrelated
|
||||
policy is unchanged. Backend PR333 passed full consumer validation before its
|
||||
required checks changed. Docs PR335 passed the two-job path and cancellation proof.
|
||||
|
||||
## Contract
|
||||
|
||||
@@ -16,17 +19,17 @@ verification, required-check migration and consumer opt-in remain pending.
|
||||
|
||||
## Required order
|
||||
|
||||
1. Local make all, 20 BATS, 31 classifier cases, eight source/packed graph cases, and CircleCI config validation passed. Finish hosted CI and publish the gate-capable orb.
|
||||
1. Local make all, 20 BATS, 31 classifier cases, eight source/packed graph cases, and CircleCI config validation passed. Hosted CI and stable publication also passed.
|
||||
2. Adopt it in the consumer with docs-only disabled. Observe successful actual
|
||||
GitHub context `ci/circleci: ci-ready`; do not infer the name from YAML alone.
|
||||
3. Replace the consumer required-check list with that verified aggregate context,
|
||||
preserving review, signature, conversation, bypass and all other branch rules.
|
||||
4. Enable `ci.docs_only: true`; prove docs-only and mixed/code changes select the
|
||||
expected paths and retain the required gate.
|
||||
5. Separately verify Munitor's native no-op context (expected
|
||||
5. Separately verify Munitor's native no-op context (observed
|
||||
`ci/circleci: lint-pack/ci-ready`) before migrating its required checks.
|
||||
|
||||
All five adoption steps are pending; an implemented template is not rollout proof.
|
||||
Publication and both required-check migrations are complete, following successful actual-context verification.
|
||||
To avoid duplicate full builds, the pin and opt-in may share one adoption PR:
|
||||
the manifest/config changes force full CI. Verify its gate and migrate required
|
||||
checks before merging or opening a docs-only PR.
|
||||
@@ -44,3 +47,15 @@ blend docs runs into a claimed full-build improvement or sum parallel job median
|
||||
|
||||
Backend native auto-cancel is on; main is its exempt default branch. Munitor stays
|
||||
off because develop is its default and main/release work is not similarly exempt.
|
||||
|
||||
## Observed consumer results
|
||||
|
||||
Backend PR333 (664efcad) ran the complete pipeline in 15m33, with all 777 test
|
||||
identities preserved and every check successful, including the actual required
|
||||
ci/circleci: ci-ready. Required lists on main/develop were migrated only after
|
||||
that proof; all other rules were verified unchanged. The latest full run is a
|
||||
sample, not a new median; the earlier successful parallel-suite run was 14m49.
|
||||
|
||||
Docs PR335 selected only secrets-scan and ci-ready. A follow-up documentation
|
||||
commit caused native cancellation of the older workflow after 44 seconds, with
|
||||
no explicit cancel API call. The final docs run passed in 5m23 (313s secrets scanning, 4s aggregate result), then merged as 8dda8339. Main also selected only those two jobs, with no application release.
|
||||
@@ -1,3 +1,43 @@
|
||||
## Release 0.3.11 (2026-10-19)
|
||||
|
||||
PR52 passed all eight hosted checks on 18ea857 and merged as d76a46c.
|
||||
This release forwards configured Java migration images and smoke paths to develop
|
||||
and staging. Source and packed generator regressions, make all and 20 BATS pass.
|
||||
Release metadata is the only change from the verified implementation; stable
|
||||
publication and backend adoption follow. Production 0.1.138 remains healthy.
|
||||
|
||||
## Java deployment health parameter correction (2026-10-19)
|
||||
|
||||
Backend develop job 6405 exposed missing migration/smoke configuration in the
|
||||
shared Java deployment partial: startup failed because slack_template was absent.
|
||||
The partial now forwards health_migrations and health_smoke_paths just like the
|
||||
production and release workflows. No application or scan policy changes.
|
||||
|
||||
tests/test_java_deploy_health.sh checks configured values and empty defaults in
|
||||
develop, staging, production and release-candidate using both source and packed
|
||||
generators. Full make all, 20 BATS tests, focused regression rerun and shell lint
|
||||
passed through WSL. Packed scripts are synchronized. Publication and consumer
|
||||
verification are pending.
|
||||
|
||||
## Verified agile CI rollout (2026-10-19)
|
||||
|
||||
Munitor 0.3.10 is published from main 19192d07 (PR48 implementation, PR49 release,
|
||||
PR50 back-merge). Backend PR333 adopted it and passed the complete workflow:
|
||||
777 identical test identities, zero failures/errors, five skips, 15m33 elapsed.
|
||||
Its actual ci/circleci: ci-ready result now protects main/develop; Munitor uses
|
||||
ci/circleci: lint-pack/ci-ready. Only the required-check lists changed; other
|
||||
branch rules are unchanged. Published source and actual consumer compilation passed.
|
||||
|
||||
Backend docs PR335 selected exactly secrets-scan plus ci-ready, without build,
|
||||
image or deployment jobs. Native auto-cancel canceled the first docs run after
|
||||
44 seconds when the final documentation commit arrived. No cancellation script
|
||||
or manual cancellation was used. The final docs run passed in 5m23 and merged as 8dda8339; main also selected only those two jobs.
|
||||
|
||||
Native Insights supplies ongoing P50/P95 and flaky-test reporting. Historical
|
||||
windows lag current work; compare matching samples and keep docs-checks separate.
|
||||
Backend auto-cancel is enabled; Munitor remains off because its default develop
|
||||
would not exempt main release workflows. No new orchestration or reporting service.
|
||||
|
||||
## Release 0.3.10 (2026-10-19)
|
||||
|
||||
PR48 merged as f9ef625 after all hosted checks passed on a56ef1d. Local make all,
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@
|
||||
|
||||
## Pending
|
||||
|
||||
- [ ] Publish and adopt aggregate CI result and docs-only opt-in; verify real check names before changing required checks (docs/PLAN-agile-ci.md).
|
||||
- [ ] Validate and release Java develop/staging health_migrations and health_smoke_paths propagation; verify both generators and a corrected consumer build before claiming rollout success.
|
||||
|
||||
- [x] Publish 0.3.10, adopt in backend PR333, verify aggregate check names and migrate required lists; docs PR335 passed in 5m23 and native cancellation was observed (docs/PLAN-agile-ci.md).
|
||||
|
||||
- [x] Publish fast Java CI as 0.3.9; backend PR330 adopted it and measured the warm workflow at 20m45 (from 37m04).
|
||||
|
||||
|
||||
@@ -2694,6 +2694,8 @@ cat > /tmp/munitor/templates/partials/java-webapp-deploy.yml.tpl << 'MUNITOR_PAR
|
||||
health_path: ${MUNITOR_HEALTH_PATH}
|
||||
health_port: "${MUNITOR_HEALTH_PORT}"
|
||||
health_db: "${MUNITOR_HEALTH_DB}"
|
||||
health_migrations: "${MUNITOR_HEALTH_MIGRATIONS}"
|
||||
health_smoke_paths: "${MUNITOR_HEALTH_SMOKE_PATHS}"
|
||||
##IF_SUPPLEMENTAL##
|
||||
supplemental_images: '${MUNITOR_SUPPLEMENTAL_IMAGES_JSON}'
|
||||
##ENDIF_SUPPLEMENTAL##
|
||||
|
||||
@@ -66,6 +66,8 @@
|
||||
health_path: ${MUNITOR_HEALTH_PATH}
|
||||
health_port: "${MUNITOR_HEALTH_PORT}"
|
||||
health_db: "${MUNITOR_HEALTH_DB}"
|
||||
health_migrations: "${MUNITOR_HEALTH_MIGRATIONS}"
|
||||
health_smoke_paths: "${MUNITOR_HEALTH_SMOKE_PATHS}"
|
||||
##IF_SUPPLEMENTAL##
|
||||
supplemental_images: '${MUNITOR_SUPPLEMENTAL_IMAGES_JSON}'
|
||||
##ENDIF_SUPPLEMENTAL##
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify deployment health configuration reaches source and shipped generators.
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
WORK=$(mktemp -d)
|
||||
trap 'rm -rf -- "$WORK"' EXIT
|
||||
export CIRCLE_BRANCH=develop CIRCLE_TAG=""
|
||||
cp "${SCRIPT_DIR}/fixtures/java-webapp.munitor.yml" "${WORK}/defaults.yml"
|
||||
cp "${WORK}/defaults.yml" "${WORK}/configured.yml"
|
||||
cat >>"${WORK}/configured.yml" <<'YAML'
|
||||
health:
|
||||
path: /health/ready
|
||||
port: 8181
|
||||
db: "true"
|
||||
migrations: migrations
|
||||
smoke_paths:
|
||||
- /api/templates
|
||||
- /api/version
|
||||
YAML
|
||||
|
||||
# Packed helpers share /tmp/munitor; run these generators sequentially.
|
||||
for generator in generate_config.sh packed_generate_config.sh; do
|
||||
for mode in configured defaults; do
|
||||
MUNITOR_CONFIG="${WORK}/${mode}.yml" MUNITOR_OUTPUT_FILE="${WORK}/generated.yml" \
|
||||
bash "${SCRIPT_DIR}/../src/scripts/${generator}" >"${WORK}/generator.log" 2>&1 || {
|
||||
cat "${WORK}/generator.log"
|
||||
exit 1
|
||||
}
|
||||
yq -o=json '.' "${WORK}/generated.yml" >"${WORK}/generated.json"
|
||||
python3 - "${WORK}/generated.json" "$mode" <<'PY'
|
||||
import json
|
||||
import sys
|
||||
|
||||
with open(sys.argv[1], encoding='utf-8') as source:
|
||||
workflows = json.load(source)['workflows']
|
||||
expected = {'health_migrations': '', 'health_smoke_paths': ''}
|
||||
if sys.argv[2] == 'configured':
|
||||
expected = {
|
||||
'health_path': '/health/ready',
|
||||
'health_port': '8181',
|
||||
'health_db': 'true',
|
||||
'health_migrations': 'migrations',
|
||||
'health_smoke_paths': '/api/templates,/api/version',
|
||||
}
|
||||
for workflow in ('develop', 'staging', 'production', 'release-candidate'):
|
||||
jobs = [job['munitor/docker_build_push'] for job in workflows[workflow]['jobs']
|
||||
if isinstance(job, dict) and 'munitor/docker_build_push' in job]
|
||||
assert len(jobs) == 1, (workflow, 'expected one Docker build job', jobs)
|
||||
for parameter, value in expected.items():
|
||||
assert jobs[0].get(parameter) == value, (workflow, parameter, jobs[0].get(parameter), value)
|
||||
PY
|
||||
printf 'PASS: %s %s deployment health parameters\n' "$generator" "$mode"
|
||||
done
|
||||
done
|
||||
Reference in new issue
Block a user