Compare commits
77
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a90becf37 | ||
|
|
99ac8dec53 | ||
|
|
859eb4badb | ||
|
|
357aba57bc | ||
|
|
fb86d1a4a7 | ||
|
|
e9eb225480 | ||
|
|
09dac40a1e | ||
|
|
07a8f5cec2 | ||
|
|
c4f7b5ba76 | ||
|
|
3fd8baeda9 | ||
|
|
1334ababf1 | ||
|
|
3ca2b71ffa | ||
|
|
df9113296e | ||
|
|
9b73a4ed5f | ||
|
|
aa865fefd5 | ||
|
|
a5d10e8c1c | ||
|
|
4f1e5e663d | ||
|
|
898862a095 | ||
|
|
21403d2287 | ||
|
|
2675bb7a36 | ||
|
|
12eccc9e7d | ||
|
|
9e2652d735 | ||
|
|
c4e41dea6b | ||
|
|
4562d5c2d2 | ||
|
|
322a194c05 | ||
|
|
a92d6d13bb | ||
|
|
9772090684
|
||
|
|
ab666bb785 | ||
|
|
fc39293b9d
|
||
|
|
e83b8481b9 | ||
|
|
e4ecae6294
|
||
|
|
37b91db07b | ||
|
|
c30d821f7e
|
||
|
|
6ae688dcf4 | ||
|
|
78207c16be
|
||
|
|
efd50aee2f | ||
|
|
6dd473be25
|
||
|
|
1c8a7c57e5 | ||
|
|
abaebf50ff
|
||
|
|
c56e52d4cb | ||
|
|
09046d45b0
|
||
|
|
9e9e6c1fa5 | ||
|
|
45aaccd2a9 | ||
|
|
ab77962b6a | ||
|
|
d0792d60d6 | ||
|
|
72f5f4d4e7 | ||
|
|
00af9aae31 | ||
|
|
7e60372948 | ||
|
|
45bab9d960 | ||
|
|
f304afb0be | ||
|
|
f76b9f7a7c | ||
|
|
fdf62a2f5a | ||
|
|
94341ef481 | ||
|
|
2debeada5d | ||
|
|
6febeff590 | ||
|
|
8b58a45f35 | ||
|
|
fbe36d683d | ||
|
|
bd5ee3bec5 | ||
|
|
d4d6e97df0 | ||
|
|
c288a8864f | ||
|
|
9906c8f120 | ||
|
|
4dcf2c1891 | ||
|
|
cc30f599e6 | ||
|
|
05a2a5217a | ||
|
|
7d73ac90b6 | ||
|
|
edc1365ac9 | ||
|
|
0f33ddadf8 | ||
|
|
5e9bbb54ec | ||
|
|
5bcec90e33 | ||
|
|
a50b07d927 | ||
|
|
6318d90e96 | ||
|
|
a6fea661ff | ||
|
|
2894bae29a | ||
|
|
a14e8f9b24 | ||
|
|
83611872a3 | ||
|
|
30c4e0e85c | ||
|
|
f429d9f3c4 |
No files matched your search
@@ -7,12 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- `cli` profile: publishes `@qrun-io/qqq-core` between the client and the conformance package on tag publishes, and refuses to publish when core's version differs from the CLI's or from the CLI's exact core dependency
|
||||
- `cli` profile: one shared npm dist-tag for the four packages, `latest` when every version is final and `rc` when any has a prerelease part
|
||||
- `cli` profile: optional `platforms: [macos-arm64, windows-x64]` manifest key that adds `cli_platform` lanes (new `cli_macos_arm64` and `cli_windows_x64` executors); a publishing tag's `cli_verify_publish` requires them. Off by default; other profiles reject the key
|
||||
- `cli_verify.sh` runs `npm run lint` and diffs `packages/core/src/api/operations.ts` in the drift check; Node image `cimg/node:22.23`
|
||||
|
||||
### Fixed
|
||||
- Maven compile, verify and frontend test steps pass `--update-snapshots`, so SNAPSHOT dependencies restored from the pom-checksum-keyed `~/.m2` cache are re-checked against the remote on every build instead of going stale
|
||||
|
||||
|
||||
@@ -146,15 +146,6 @@ The orb auto-publishes via CircleCI:
|
||||
|
||||
Version bumps on main default to patch. Include `[minor]` or `[major]` in a commit message to bump accordingly.
|
||||
|
||||
## Voyage quality checks
|
||||
|
||||
The Voyage profile requires no Sonar service, account or token. Its existing
|
||||
`mvn clean verify` runs the application's Checkstyle, PMD, SpotBugs and JaCoCo
|
||||
checks alongside unit and integration tests. The profile retains those failures
|
||||
as build failures and publishes their XML reports and `target/site` as artifacts.
|
||||
The separate secret, SAST, dependency and image scans remain unchanged, as do
|
||||
the dependencies that gate image publication and production GitOps updates.
|
||||
|
||||
## Project Status
|
||||
|
||||
**Maturity:** Stable, used across all QQQ repositories
|
||||
|
||||
+238
-258
@@ -1,258 +1,238 @@
|
||||
# Standardized QQQ pipelines
|
||||
|
||||
The orb owns workflow selection and job configuration. A consumer declares a
|
||||
small manifest; it does not copy pipeline jobs. The initial supported profile is
|
||||
`qbit`; `core` owns the framework's complete acceptance/release graph. Frontend
|
||||
and CLI profiles described below retain their own publication contracts. Additional
|
||||
profiles belong in reviewed `PROFILE_TEMPLATES` renderers in
|
||||
`src/scripts/generate_pipeline.py`, with profile-specific schema and tests. There
|
||||
is no arbitrary script or job-YAML passthrough.
|
||||
|
||||
Use the same **published** orb version in all three positions below. `0.7.0` is
|
||||
an illustrative version, not a claim that this change is published. A development
|
||||
orb version can be used for a controlled canary.
|
||||
|
||||
`.circleci/config.yml`:
|
||||
|
||||
```yaml
|
||||
version: 2.1
|
||||
setup: true
|
||||
orbs:
|
||||
qqq-orb: kingsrook/qqq-orb@0.7.0
|
||||
workflows:
|
||||
setup:
|
||||
jobs:
|
||||
- qqq-orb/generate_pipeline:
|
||||
orb_version: "0.7.0"
|
||||
filters:
|
||||
branches:
|
||||
ignore: automation/qbit-rc-pending
|
||||
tags:
|
||||
only: /.*/
|
||||
```
|
||||
|
||||
`.qqq-ci.yml`:
|
||||
|
||||
```yaml
|
||||
profile: qbit
|
||||
orb_version: "0.7.0"
|
||||
default_branch: develop
|
||||
java_version: "21"
|
||||
browsers: false
|
||||
api_checks: false
|
||||
docs_only: false
|
||||
publish:
|
||||
snapshot: true
|
||||
release_candidate: true
|
||||
release: true
|
||||
asciidoc: false
|
||||
```
|
||||
|
||||
Only `profile`, `orb_version` and `default_branch` are required. `default_branch`
|
||||
must be `develop` or `main`; Java must be the string `17` or `21`. Browsers default
|
||||
to **true** for compatibility: opt out only after verifying that the consumer has
|
||||
no browser tests. API checks and docs-only default to false. Publication defaults
|
||||
to true for snapshots, RCs and tagged releases; AsciiDoc publication defaults to
|
||||
false. Unknown/duplicate keys, unexpected types, unsupported profiles and a setup
|
||||
parameter/manifest version mismatch fail before continuation. The canonical-caller
|
||||
validator also verifies the setup import, filters and profile-specific parameter
|
||||
declarations; additional jobs, commands, workflows or orbs fail validation. The
|
||||
parser is pinned to PyYAML 6.0.3 and uses its safe loader.
|
||||
|
||||
| Event | Workflow | Job contract |
|
||||
| --- | --- | --- |
|
||||
| develop | verify | existing mvn_publish, snapshot |
|
||||
| release/* | verify | existing mvn_publish, release_candidate |
|
||||
| vX.Y.Z tag resolving to the checkout | verify | existing mvn_publish, release |
|
||||
| main, feature/*, hotfix/*, other/unknown branch | verify | existing mvn_test_only |
|
||||
| Disabled publication or unrecognized/unproven tag | verify | full verification, no publication |
|
||||
|
||||
Generated `qbit`, `core`, `frontend-core`, and `frontend-material` pipelines use
|
||||
the stable workflow name `verify`. All selected jobs, dependencies and filters
|
||||
remain intact; this adds no executor or duplicate build. Other profiles retain
|
||||
their existing workflow names and native checks.
|
||||
|
||||
When upgrading from legacy workflow names, upgrade the immutable RC worker pin
|
||||
alongside the orb so finalization recognizes both names. Confirm the CircleCI
|
||||
app's successful `verify` check on the exact migration commit before replacing
|
||||
legacy required contexts. Require `setup` and `verify` on managed branches,
|
||||
preserving other required checks and controls. Human approval is not required;
|
||||
automated checks authorize the migration.
|
||||
|
||||
The pipeline SHA must match the checkout when Circle supplies it. A tagged release
|
||||
must resolve to that checkout; missing local tags are fetched individually. A main
|
||||
push does **not** publish a release. Migrating a legacy main-publishing consumer
|
||||
therefore requires explicit review of its release contract. Existing direct orb
|
||||
callers remain supported.
|
||||
|
||||
The setup filter and generated jobs exclude `automation/qbit-rc-pending`, the
|
||||
shared RC orchestrator's persistent release lock. Lock updates must not trigger
|
||||
Maven test or publication work.
|
||||
|
||||
The shared jobs keep the `qqq-maven-registry-credentials` context, complete verify,
|
||||
coverage and configured API checks. Publishing retains version management, signed
|
||||
artifact deployment, Git operations and release handling. Generated calls disable
|
||||
the redundant preliminary compile; they do not skip tests or verification. Existing
|
||||
callers retain the compatibility defaults in the jobs.
|
||||
|
||||
## Core profile
|
||||
|
||||
QBit alone accepts `release_completion: true` (default false). It enables the
|
||||
shared Maven RC job's `notify_rc_published` only for RC publication, including
|
||||
fail-closed verification that the bumped version was pushed before dispatching
|
||||
the completion event. Enable this on a consumer only after its default branch
|
||||
contains the shared completion caller. Snapshot and GA jobs never receive this
|
||||
opt-in; other profiles reject the key.
|
||||
|
||||
Use `profile: core` for the QQQ framework. The orb owns the complete baseline
|
||||
acceptance, broker conformance, cold bootstrap, coverage, diagnostics, static
|
||||
analysis and publication graph. Core scripts remain in the core source repository.
|
||||
The independent baseline fixture pins job sets, dependency edges, contexts,
|
||||
coverage requirements and actual verification commands across all six workflows.
|
||||
|
||||
Core additionally supports `publish.feature` and `publish.hotfix` (both true by
|
||||
default), preserving `publish*` tag and hotfix branch publication. QBit supports
|
||||
both keys as explicit opt-ins (false by default). QBit feature publishing requires
|
||||
a `publish*` tag resolving to the checked-out commit; feature branch pushes remain
|
||||
test-only. Snapshot, RC and GA behavior remains distinct; RC/GA/hotfix
|
||||
publication still requires the complete source coverage gate. Cold bootstrap and
|
||||
fresh consumer Maven repositories remain uncached. Shared installer policy replaces
|
||||
local package preparation; preliminary compilation is disabled before clean
|
||||
lifecycles and the dependency cache is saved after successful verification.
|
||||
|
||||
Lambda XML copies remain in sample coverage evidence. The sample JUnit collector
|
||||
excludes those two copied reports because their original module directories are
|
||||
already uploaded, avoiding duplicate test identities without dropping evidence.
|
||||
|
||||
External core API triggers require these declarations in the tiny **setup** config:
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
mongo_bind_diagnostics:
|
||||
type: boolean
|
||||
default: false
|
||||
next_acceptance_bundle_url:
|
||||
type: string
|
||||
default: ""
|
||||
next_acceptance_bundle_sha256:
|
||||
type: string
|
||||
default: ""
|
||||
next_acceptance_receipt_sha256:
|
||||
type: string
|
||||
default: ""
|
||||
```
|
||||
|
||||
Forward each value on `qqq-orb/generate_pipeline`, for example
|
||||
`mongo_bind_diagnostics: << pipeline.parameters.mongo_bind_diagnostics >>`, and
|
||||
likewise for the three bundle parameters. Requested values become defaults in the
|
||||
continued configuration; the continuation POST deliberately omits `parameters` to
|
||||
avoid CircleCI's setup/continuation/API parameter conflict. Verify both default and
|
||||
explicit API-triggered parameter values in the hosted canary before migrating
|
||||
triggering consumers. Other profiles reject non-default core parameters.
|
||||
|
||||
## Frontend profiles
|
||||
|
||||
`frontend-material` preserves the Maven frontend build/test/package/publication
|
||||
jobs, Java21/Node20 defaults, registry context, feature-tag, RC, GA and hotfix
|
||||
contracts. Declare setup pipeline parameter `run_playwright` (boolean, default
|
||||
false) and forward `run_playwright: << pipeline.parameters.run_playwright >>` on
|
||||
the generator job. Test/snapshot events select exactly one base or Playwright graph,
|
||||
so enabling visual tests cannot publish twice. Visual testing retains the pinned
|
||||
Playwright image, npm ci with legacy peer dependencies and report uploads; only
|
||||
npm downloads (`~/.npm`) are cached, never node_modules.
|
||||
|
||||
`frontend-core` preserves Node24.21, npm trusted publishing and both existing
|
||||
registry/build-sample contexts. Unlike QBit, its existing main-push **and v-tag**
|
||||
release contract remains intentional. Both frontend profiles support explicit
|
||||
numeric-string `node_version` and publication toggles including feature/hotfix.
|
||||
Material also supports `java_version`. Browser/API/AsciiDoc flags are rejected
|
||||
rather than silently ignored on these profiles. Existing direct jobs remain usable.
|
||||
|
||||
## CLI profile
|
||||
|
||||
`cli` owns npm install, generated-client and operations drift, build, unit tests,
|
||||
lint and the real Prism smoke contract through `cli_verify_publish`. Publication is **disabled by
|
||||
default**. To enable the existing v-tag publication, declare `publish.release:
|
||||
true` plus `publish_context: VERIFIED_CONTEXT_NAME`, after verifying that an
|
||||
existing trusted CircleCI context grants the required GitHub Packages permission.
|
||||
No context name or credential availability is inferred from the former Actions
|
||||
GITHUB_TOKEN. A tag must resolve to the current checkout; the job additionally
|
||||
checks the client version, and that core shares the CLI version and matches the
|
||||
CLI's exact core dependency, before publishing its four fixed workspaces (client,
|
||||
core, conformance, CLI) under one dist-tag: `rc` if any of the four versions has
|
||||
a prerelease part, otherwise `latest`. Main pushes never publish.
|
||||
CLI docs-only is currently rejected because generated-client verification remains
|
||||
mandatory.
|
||||
|
||||
Optional platform lanes are **off by default**. `platforms: [macos-arm64,
|
||||
windows-x64]` (either or both) adds one `cli_platform` job per entry (`npm ci`,
|
||||
build, tests and lint on Node 20 via the image's nvm), named `cli-macos-arm64` /
|
||||
`cli-windows-x64`. On a publishing tag `cli_verify_publish` requires them. The
|
||||
lanes use the `m4pro.medium` macOS and `windows.medium` resource classes, which
|
||||
the CircleCI plan must include.
|
||||
|
||||
## Conservative documentation routing
|
||||
|
||||
With `docs_only: true`, only feature/hotfix and main changes can take the light
|
||||
route. Feature/hotfix branches fetch the declared default branch without tags and
|
||||
compare its merge base with HEAD, covering the whole branch. Main compares its first
|
||||
parent. Develop, release branches and all tags remain full. Shallow repositories,
|
||||
missing ancestry, fetch/diff errors, empty diffs and unknown paths remain full.
|
||||
|
||||
Only root README.md, CHANGELOG.md, CONTRIBUTING.md and Markdown files below docs/
|
||||
are eligible. Renames are treated as deletion plus addition, so moving code into
|
||||
docs cannot hide it. The lightweight job checks whitespace over the proven diff;
|
||||
manifest validation already ran in setup. It adds no new security scanner and
|
||||
makes no security-scanning claim. Keep docs-only disabled if those paths are build
|
||||
inputs or packaged application content.
|
||||
|
||||
The light route keeps workflow `verify` and names its job
|
||||
`qqq-orb/mvn_test_only`. Verify actual CircleCI/GitHub status contexts on the canary
|
||||
before changing any protection rule; workflow/job identity alone is not proof of
|
||||
the hosted context name. Current protections must not be removed speculatively.
|
||||
|
||||
## Implementation and verification
|
||||
|
||||
The setup job checks out source, installs the pinned parser, runs the embedded
|
||||
Python resource and invokes CircleCI's native continuation API once. JSON output
|
||||
is valid CircleCI configuration YAML; it is saved at
|
||||
`/tmp/qqq-generated-config.json`. No external framework or per-consumer generator
|
||||
installation is required. Readable templates live in src/scripts/templates. scripts/pack_pipeline.py embeds
|
||||
them as base64 into packed_generate_pipeline.py before orb packing, preventing
|
||||
CircleCI from interpolating template expressions during setup. The orb includes
|
||||
the complete generated resource; no runtime source-tree template access is needed.
|
||||
make pack regenerates it and CI rejects a stale generated resource.
|
||||
Continuation credentials and response bodies are never printed.
|
||||
|
||||
Run `make test-pipelines` with CircleCI CLI, Python3/PyYAML and Bash available.
|
||||
Tests use offline temporary Git repositories and a bare origin to cover selection,
|
||||
whole-branch changes, tags, errors, defaults and source/packed parity. The hosted
|
||||
pipeline-contract-test runs the source suite and shared Maven behavioral tests;
|
||||
the full local target additionally extracts and executes the actual packed command.
|
||||
|
||||
## Node snapshot versions
|
||||
|
||||
The shared Node publisher calculates develop snapshots as
|
||||
`MAJOR.MINOR.NEXT_PATCH-SNAPSHOT.CIRCLE_BUILD_NUM`. A positive CircleCI job number
|
||||
is required, so independent publication jobs receive distinct npm coordinates.
|
||||
The package version is changed only in the build workspace and published under
|
||||
the `snapshot` dist-tag. No snapshot version commit is pushed: the branch remains
|
||||
at the source revision whose required checks ran, avoiding unchecked `[skip ci]`
|
||||
heads and recursive publication. Stable, RC and hotfix version policies are unchanged.
|
||||
|
||||
## Android and MCP policy profiles
|
||||
|
||||
`android` and `mcp-policy` accept only profile, orb_version and default_branch.
|
||||
Android retains the audited Android/GCP orb versions and every active unit,
|
||||
emulator and Maven-publication step. The emulator now runs on main as well as
|
||||
feature branches so main publication cannot omit its required instrumentation
|
||||
gate. Dormant Firebase benchmark and release-build definitions referencing absent
|
||||
app/macrobenchmark modules are not scheduled or copied into the profile.
|
||||
|
||||
MCP policy validation remains a small Python container validating all visible YAML
|
||||
and required pattern fields. Its existing PyYAML dependency is pinned to 6.0.3.
|
||||
Neither profile introduces Maven/JUnit stand-ins for its actual tests.
|
||||
|
||||
`tests/test_mobile_policy_profiles.py` protects Android steps and dependency edges
|
||||
and executes the policy validator with valid, incomplete and malformed documents.
|
||||
The generator suite verifies source/packed parity for both profiles.
|
||||
# Standardized QQQ pipelines
|
||||
|
||||
The orb owns workflow selection and job configuration. A consumer declares a
|
||||
small manifest; it does not copy pipeline jobs. The initial supported profile is
|
||||
`qbit`; `core` owns the framework's complete acceptance/release graph. Frontend
|
||||
and CLI profiles described below retain their own publication contracts. Additional
|
||||
profiles belong in reviewed `PROFILE_TEMPLATES` renderers in
|
||||
`src/scripts/generate_pipeline.py`, with profile-specific schema and tests. There
|
||||
is no arbitrary script or job-YAML passthrough.
|
||||
|
||||
Use the same **published** orb version in all three positions below. `0.7.0` is
|
||||
an illustrative version, not a claim that this change is published. A development
|
||||
orb version can be used for a controlled canary.
|
||||
|
||||
`.circleci/config.yml`:
|
||||
|
||||
```yaml
|
||||
version: 2.1
|
||||
setup: true
|
||||
orbs:
|
||||
qqq-orb: kingsrook/qqq-orb@0.7.0
|
||||
workflows:
|
||||
setup:
|
||||
jobs:
|
||||
- qqq-orb/generate_pipeline:
|
||||
orb_version: "0.7.0"
|
||||
filters:
|
||||
branches:
|
||||
ignore: automation/qbit-rc-pending
|
||||
tags:
|
||||
only: /.*/
|
||||
```
|
||||
|
||||
`.qqq-ci.yml`:
|
||||
|
||||
```yaml
|
||||
profile: qbit
|
||||
orb_version: "0.7.0"
|
||||
default_branch: develop
|
||||
java_version: "21"
|
||||
browsers: false
|
||||
api_checks: false
|
||||
docs_only: false
|
||||
publish:
|
||||
snapshot: true
|
||||
release_candidate: true
|
||||
release: true
|
||||
asciidoc: false
|
||||
```
|
||||
|
||||
Only `profile`, `orb_version` and `default_branch` are required. `default_branch`
|
||||
must be `develop` or `main`; Java must be the string `17` or `21`. Browsers default
|
||||
to **true** for compatibility: opt out only after verifying that the consumer has
|
||||
no browser tests. API checks and docs-only default to false. Publication defaults
|
||||
to true for snapshots, RCs and tagged releases; AsciiDoc publication defaults to
|
||||
false. Unknown/duplicate keys, unexpected types, unsupported profiles and a setup
|
||||
parameter/manifest version mismatch fail before continuation. The canonical-caller
|
||||
validator also verifies the setup import, filters and profile-specific parameter
|
||||
declarations; additional jobs, commands, workflows or orbs fail validation. The
|
||||
parser is pinned to PyYAML 6.0.3 and uses its safe loader.
|
||||
|
||||
| Event | Workflow | Job contract |
|
||||
| --- | --- | --- |
|
||||
| develop | verify | existing mvn_publish, snapshot |
|
||||
| release/* | verify | existing mvn_publish, release_candidate |
|
||||
| vX.Y.Z tag resolving to the checkout | verify | existing mvn_publish, release |
|
||||
| main, feature/*, hotfix/*, other/unknown branch | verify | existing mvn_test_only |
|
||||
| Disabled publication or unrecognized/unproven tag | verify | full verification, no publication |
|
||||
|
||||
Generated `qbit`, `core`, `frontend-core`, and `frontend-material` pipelines use
|
||||
the stable workflow name `verify`. All selected jobs, dependencies and filters
|
||||
remain intact; this adds no executor or duplicate build. Other profiles retain
|
||||
their existing workflow names and native checks.
|
||||
|
||||
When upgrading from legacy workflow names, upgrade the immutable RC worker pin
|
||||
alongside the orb so finalization recognizes both names. Confirm the CircleCI
|
||||
app's successful `verify` check on the exact migration commit before replacing
|
||||
legacy required contexts. Require `setup` and `verify` on managed branches,
|
||||
preserving other required checks and controls. Human approval is not required;
|
||||
automated checks authorize the migration.
|
||||
|
||||
The pipeline SHA must match the checkout when Circle supplies it. A tagged release
|
||||
must resolve to that checkout; missing local tags are fetched individually. A main
|
||||
push does **not** publish a release. Migrating a legacy main-publishing consumer
|
||||
therefore requires explicit review of its release contract. Existing direct orb
|
||||
callers remain supported.
|
||||
|
||||
The setup filter and generated jobs exclude `automation/qbit-rc-pending`, the
|
||||
shared RC orchestrator's persistent release lock. Lock updates must not trigger
|
||||
Maven test or publication work.
|
||||
|
||||
The shared jobs keep the `qqq-maven-registry-credentials` context, complete verify,
|
||||
coverage and configured API checks. Publishing retains version management, signed
|
||||
artifact deployment, Git operations and release handling. Generated calls disable
|
||||
the redundant preliminary compile; they do not skip tests or verification. Existing
|
||||
callers retain the compatibility defaults in the jobs.
|
||||
|
||||
## Core profile
|
||||
|
||||
QBit alone accepts `release_completion: true` (default false). It enables the
|
||||
shared Maven RC job's `notify_rc_published` only for RC publication, including
|
||||
fail-closed verification that the bumped version was pushed before dispatching
|
||||
the completion event. Enable this on a consumer only after its default branch
|
||||
contains the shared completion caller. Snapshot and GA jobs never receive this
|
||||
opt-in; other profiles reject the key.
|
||||
|
||||
Use `profile: core` for the QQQ framework. The orb owns the complete baseline
|
||||
acceptance, broker conformance, cold bootstrap, coverage, diagnostics, static
|
||||
analysis and publication graph. Core scripts remain in the core source repository.
|
||||
The independent baseline fixture pins job sets, dependency edges, contexts,
|
||||
coverage requirements and actual verification commands across all six workflows.
|
||||
|
||||
Core additionally supports `publish.feature` and `publish.hotfix` (both true by
|
||||
default), preserving `publish*` tag and hotfix branch publication. QBit supports
|
||||
both keys as explicit opt-ins (false by default). QBit feature publishing requires
|
||||
a `publish*` tag resolving to the checked-out commit; feature branch pushes remain
|
||||
test-only. Snapshot, RC and GA behavior remains distinct; RC/GA/hotfix
|
||||
publication still requires the complete source coverage gate. Cold bootstrap and
|
||||
fresh consumer Maven repositories remain uncached. Shared installer policy replaces
|
||||
local package preparation; preliminary compilation is disabled before clean
|
||||
lifecycles and the dependency cache is saved after successful verification.
|
||||
|
||||
Lambda XML copies remain in sample coverage evidence. The sample JUnit collector
|
||||
excludes those two copied reports because their original module directories are
|
||||
already uploaded, avoiding duplicate test identities without dropping evidence.
|
||||
|
||||
External core API triggers require these declarations in the tiny **setup** config:
|
||||
|
||||
```yaml
|
||||
parameters:
|
||||
mongo_bind_diagnostics:
|
||||
type: boolean
|
||||
default: false
|
||||
next_acceptance_bundle_url:
|
||||
type: string
|
||||
default: ""
|
||||
next_acceptance_bundle_sha256:
|
||||
type: string
|
||||
default: ""
|
||||
next_acceptance_receipt_sha256:
|
||||
type: string
|
||||
default: ""
|
||||
```
|
||||
|
||||
Forward each value on `qqq-orb/generate_pipeline`, for example
|
||||
`mongo_bind_diagnostics: << pipeline.parameters.mongo_bind_diagnostics >>`, and
|
||||
likewise for the three bundle parameters. Requested values become defaults in the
|
||||
continued configuration; the continuation POST deliberately omits `parameters` to
|
||||
avoid CircleCI's setup/continuation/API parameter conflict. Verify both default and
|
||||
explicit API-triggered parameter values in the hosted canary before migrating
|
||||
triggering consumers. Other profiles reject non-default core parameters.
|
||||
|
||||
## Frontend profiles
|
||||
|
||||
`frontend-material` preserves the Maven frontend build/test/package/publication
|
||||
jobs, Java21/Node20 defaults, registry context, feature-tag, RC, GA and hotfix
|
||||
contracts. Declare setup pipeline parameter `run_playwright` (boolean, default
|
||||
false) and forward `run_playwright: << pipeline.parameters.run_playwright >>` on
|
||||
the generator job. Test/snapshot events select exactly one base or Playwright graph,
|
||||
so enabling visual tests cannot publish twice. Visual testing retains the pinned
|
||||
Playwright image, npm ci with legacy peer dependencies and report uploads; only
|
||||
npm downloads (`~/.npm`) are cached, never node_modules.
|
||||
|
||||
`frontend-core` preserves Node24.21, npm trusted publishing and both existing
|
||||
registry/build-sample contexts. Unlike QBit, its existing main-push **and v-tag**
|
||||
release contract remains intentional. Both frontend profiles support explicit
|
||||
numeric-string `node_version` and publication toggles including feature/hotfix.
|
||||
Material also supports `java_version`. Browser/API/AsciiDoc flags are rejected
|
||||
rather than silently ignored on these profiles. Existing direct jobs remain usable.
|
||||
|
||||
## CLI profile
|
||||
|
||||
`cli` owns npm install, generated-client drift, build, unit tests and the real
|
||||
Prism smoke contract through `cli_verify_publish`. Publication is **disabled by
|
||||
default**. To enable the existing v-tag publication, declare `publish.release:
|
||||
true` plus `publish_context: VERIFIED_CONTEXT_NAME`, after verifying that an
|
||||
existing trusted CircleCI context grants the required GitHub Packages permission.
|
||||
No context name or credential availability is inferred from the former Actions
|
||||
GITHUB_TOKEN. A tag must resolve to the current checkout; the job additionally
|
||||
checks the client version before publishing its three fixed workspaces with the
|
||||
existing rc dist-tag. Main pushes never publish. CLI docs-only is currently
|
||||
rejected because generated-client verification remains mandatory.
|
||||
|
||||
## Conservative documentation routing
|
||||
|
||||
With `docs_only: true`, only feature/hotfix and main changes can take the light
|
||||
route. Feature/hotfix branches fetch the declared default branch without tags and
|
||||
compare its merge base with HEAD, covering the whole branch. Main compares its first
|
||||
parent. Develop, release branches and all tags remain full. Shallow repositories,
|
||||
missing ancestry, fetch/diff errors, empty diffs and unknown paths remain full.
|
||||
|
||||
Only root README.md, CHANGELOG.md, CONTRIBUTING.md and Markdown files below docs/
|
||||
are eligible. Renames are treated as deletion plus addition, so moving code into
|
||||
docs cannot hide it. The lightweight job checks whitespace over the proven diff;
|
||||
manifest validation already ran in setup. It adds no new security scanner and
|
||||
makes no security-scanning claim. Keep docs-only disabled if those paths are build
|
||||
inputs or packaged application content.
|
||||
|
||||
The light route keeps workflow `verify` and names its job
|
||||
`qqq-orb/mvn_test_only`. Verify actual CircleCI/GitHub status contexts on the canary
|
||||
before changing any protection rule; workflow/job identity alone is not proof of
|
||||
the hosted context name. Current protections must not be removed speculatively.
|
||||
|
||||
## Implementation and verification
|
||||
|
||||
The setup job checks out source, installs the pinned parser, runs the embedded
|
||||
Python resource and invokes CircleCI's native continuation API once. JSON output
|
||||
is valid CircleCI configuration YAML; it is saved at
|
||||
`/tmp/qqq-generated-config.json`. No external framework or per-consumer generator
|
||||
installation is required. Readable templates live in src/scripts/templates. scripts/pack_pipeline.py embeds
|
||||
them as base64 into packed_generate_pipeline.py before orb packing, preventing
|
||||
CircleCI from interpolating template expressions during setup. The orb includes
|
||||
the complete generated resource; no runtime source-tree template access is needed.
|
||||
make pack regenerates it and CI rejects a stale generated resource.
|
||||
Continuation credentials and response bodies are never printed.
|
||||
|
||||
Run `make test-pipelines` with CircleCI CLI, Python3/PyYAML and Bash available.
|
||||
Tests use offline temporary Git repositories and a bare origin to cover selection,
|
||||
whole-branch changes, tags, errors, defaults and source/packed parity. The hosted
|
||||
pipeline-contract-test runs the source suite and shared Maven behavioral tests;
|
||||
the full local target additionally extracts and executes the actual packed command.
|
||||
|
||||
## Android and MCP policy profiles
|
||||
|
||||
`android` and `mcp-policy` accept only profile, orb_version and default_branch.
|
||||
Android retains the audited Android/GCP orb versions and every active unit,
|
||||
emulator and Maven-publication step. The emulator now runs on main as well as
|
||||
feature branches so main publication cannot omit its required instrumentation
|
||||
gate. Dormant Firebase benchmark and release-build definitions referencing absent
|
||||
app/macrobenchmark modules are not scheduled or copied into the profile.
|
||||
|
||||
MCP policy validation remains a small Python container validating all visible YAML
|
||||
and required pattern fields. Its existing PyYAML dependency is pinned to 6.0.3.
|
||||
Neither profile introduces Maven/JUnit stand-ins for its actual tests.
|
||||
|
||||
`tests/test_mobile_policy_profiles.py` protects Android steps and dependency edges
|
||||
and executes the policy validator with valid, incomplete and malformed documents.
|
||||
The generator suite verifies source/packed parity for both profiles.
|
||||
@@ -3,7 +3,7 @@ description: >
|
||||
- Adds SSH keys for Git operations
|
||||
- Sets up Git identity for version commits
|
||||
- Synchronizes NPM version
|
||||
- Commits version changes if modified (skipped for feature and snapshot builds)
|
||||
- Commits version changes if modified (skipped for feature branches)
|
||||
|
||||
parameters:
|
||||
branch_type:
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
description: >
|
||||
macOS arm64 executor for the opt-in CLI platform lane.
|
||||
Requires the CircleCI plan to include the m4pro.medium resource class.
|
||||
macos:
|
||||
xcode: 16.4.0
|
||||
resource_class: m4pro.medium
|
||||
@@ -1,7 +0,0 @@
|
||||
description: >
|
||||
Windows x64 executor for the opt-in CLI platform lane. Steps run in Git Bash.
|
||||
Requires the CircleCI plan to include the windows.medium resource class.
|
||||
machine:
|
||||
image: windows-server-2022-gui:current
|
||||
resource_class: windows.medium
|
||||
shell: bash.exe
|
||||
@@ -1,25 +0,0 @@
|
||||
description: >
|
||||
Opt-in CLI platform lane: install, build, unit tests and lint on a non-Linux
|
||||
executor. Rendered by the cli profile only for manifest platforms entries.
|
||||
executor: << parameters.executor >>
|
||||
parameters:
|
||||
executor:
|
||||
type: executor
|
||||
description: "qqq-orb/cli_macos_arm64 or qqq-orb/cli_windows_x64"
|
||||
node_version:
|
||||
type: string
|
||||
default: "20.20.2"
|
||||
description: "Exact Node.js version installed with the image's nvm (the packages' engines floor)"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Install Node.js << parameters.node_version >>
|
||||
environment:
|
||||
PARAM_NODE_VERSION: << parameters.node_version >>
|
||||
command: <<include(scripts/cli_platform_node.sh)>>
|
||||
- run:
|
||||
name: Install locked CLI dependencies
|
||||
command: npm ci
|
||||
- run:
|
||||
name: Build, tests and lint
|
||||
command: npm run build && npm test && npm run lint
|
||||
@@ -1,13 +1,13 @@
|
||||
description: >
|
||||
Authoritative QQQ CLI validation, with optional tagged GitHub Packages publication.
|
||||
Preserves generated-schema drift, build, tests, lint and Prism smoke before publishing.
|
||||
Preserves generated-schema drift, build, tests and Prism smoke before publishing.
|
||||
docker:
|
||||
- image: cimg/node:22.23
|
||||
- image: cimg/node:22.12
|
||||
parameters:
|
||||
publish:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Publish four workspaces (dist-tag rc for prereleases, latest for final versions); requires matching version tag and GITHUB_TOKEN"
|
||||
description: "Publish three workspaces with rc dist-tag; requires matching version tag and GITHUB_TOKEN"
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
# nvm is a shell function on macOS and not nounset-safe, so no -u here.
|
||||
set -eo pipefail
|
||||
|
||||
# Install the exact Node.js version with the image's nvm (macOS login shell, nvm-windows in Git Bash).
|
||||
nvm install "$PARAM_NODE_VERSION"
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
# Later steps start new login shells: make the version their default.
|
||||
nvm alias default "$PARAM_NODE_VERSION"
|
||||
else
|
||||
# nvm-windows switches the global symlink, which later steps inherit.
|
||||
nvm use "$PARAM_NODE_VERSION"
|
||||
fi
|
||||
node --version
|
||||
npm --version
|
||||
@@ -2,12 +2,10 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Validate tag and fixed package destinations before asking for credentials.
|
||||
# Prints the npm dist-tag shared by all four packages.
|
||||
dist_tag=$(node --input-type=commonjs - <<'NODE'
|
||||
node --input-type=commonjs - <<'NODE'
|
||||
const fs = require('node:fs');
|
||||
const packages = [
|
||||
['packages/ui-api-client/package.json', '@qrun-io/qqq-ui-api-client'],
|
||||
['packages/core/package.json', '@qrun-io/qqq-core'],
|
||||
['packages/conformance/package.json', '@qrun-io/qqq-ui-api-conformance'],
|
||||
['packages/cli/package.json', '@qrun-io/qqq-cli'],
|
||||
];
|
||||
@@ -21,18 +19,7 @@ const client = JSON.parse(fs.readFileSync(packages[0][0], 'utf8'));
|
||||
if (!process.env.CIRCLE_TAG || process.env.CIRCLE_TAG !== 'v' + client.version) {
|
||||
throw new Error('Version tag must match the client package version');
|
||||
}
|
||||
// The CLI pins core exactly and shares its version: publish only that pair.
|
||||
const core = JSON.parse(fs.readFileSync(packages[1][0], 'utf8'));
|
||||
const cli = JSON.parse(fs.readFileSync(packages[3][0], 'utf8'));
|
||||
if (core.version !== cli.version || cli.dependencies?.['@qrun-io/qqq-core'] !== core.version) {
|
||||
throw new Error('Core package version must match the CLI version and its exact core dependency');
|
||||
}
|
||||
// Final releases become latest; any prerelease part (e.g. -rc.1, -beta.2) in
|
||||
// any of the four keeps every package on rc, so latest never points at an rc.
|
||||
const versions = packages.map(([path]) => JSON.parse(fs.readFileSync(path, 'utf8')).version);
|
||||
console.log(versions.some((version) => version.includes('-')) ? 'rc' : 'latest');
|
||||
NODE
|
||||
)
|
||||
: "${GITHUB_TOKEN:?GitHub Packages write credential GITHUB_TOKEN is required}"
|
||||
export NODE_AUTH_TOKEN="$GITHUB_TOKEN"
|
||||
# Store only an environment substitution, never the token itself.
|
||||
@@ -48,7 +35,6 @@ export NPM_CONFIG_USERCONFIG="$npm_config"
|
||||
# Authentication alone is not proof of package write permission; hosted publish
|
||||
# migration remains gated on verifying the actual context's package access.
|
||||
npm whoami --registry https://npm.pkg.github.com >/dev/null
|
||||
npm publish -w @qrun-io/qqq-ui-api-client --registry https://npm.pkg.github.com --tag "$dist_tag"
|
||||
npm publish -w @qrun-io/qqq-core --registry https://npm.pkg.github.com --tag "$dist_tag"
|
||||
npm publish -w @qrun-io/qqq-ui-api-conformance --registry https://npm.pkg.github.com --tag "$dist_tag"
|
||||
npm publish -w @qrun-io/qqq-cli --registry https://npm.pkg.github.com --tag "$dist_tag"
|
||||
npm publish -w @qrun-io/qqq-ui-api-client --registry https://npm.pkg.github.com --tag rc
|
||||
npm publish -w @qrun-io/qqq-ui-api-conformance --registry https://npm.pkg.github.com --tag rc
|
||||
npm publish -w @qrun-io/qqq-cli --registry https://npm.pkg.github.com --tag rc
|
||||
@@ -2,10 +2,9 @@
|
||||
set -euo pipefail
|
||||
|
||||
npm run generate
|
||||
git diff --exit-code -- packages/ui-api-client/src/schema.ts packages/core/src/api/operations.ts
|
||||
git diff --exit-code -- packages/ui-api-client/src/schema.ts
|
||||
npm run build
|
||||
npm test
|
||||
npm run lint
|
||||
|
||||
# Use the locked local executable; never download an unpinned npx fallback.
|
||||
./node_modules/.bin/prism mock --port 4010 packages/ui-api-client/openapi/qqq-v1.json > prism.log 2>&1 &
|
||||
|
||||
@@ -64,10 +64,6 @@ def boolean(data, key, default):
|
||||
return value
|
||||
|
||||
|
||||
# Opt-in CLI platform lanes: manifest entry -> orb executor.
|
||||
CLI_PLATFORMS = {"macos-arm64": "qqq-orb/cli_macos_arm64", "windows-x64": "qqq-orb/cli_windows_x64"}
|
||||
|
||||
|
||||
def load_manifest(path, setup_version):
|
||||
raw = Path(path).read_text(encoding="utf-8")
|
||||
if len(raw) > 65536:
|
||||
@@ -88,7 +84,7 @@ def load_manifest(path, setup_version):
|
||||
if profile == "qbit":
|
||||
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
|
||||
elif profile == "cli":
|
||||
allowed += ("publish_context", "platforms")
|
||||
allowed += ("publish_context",)
|
||||
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "application-template"):
|
||||
allowed = ("profile", "orb_version", "default_branch")
|
||||
elif profile == "all":
|
||||
@@ -163,9 +159,6 @@ def load_manifest(path, setup_version):
|
||||
raise ManifestError("CLI publication requires an explicitly verified context")
|
||||
if profile == "cli" and boolean(data, "docs_only", False):
|
||||
raise ManifestError("CLI currently requires full generated-client verification")
|
||||
platforms = data.get("platforms", [])
|
||||
if not isinstance(platforms, list) or any(not isinstance(x, str) or x not in CLI_PLATFORMS for x in platforms) or len(platforms) != len(set(platforms)):
|
||||
raise ManifestError("platforms must be distinct entries of " + ", ".join(CLI_PLATFORMS))
|
||||
tag_policy = data.get("release_tag_policy", "stable")
|
||||
if tag_policy not in ("stable", "v-prefix", "none"):
|
||||
raise ManifestError("Unsupported QBit release tag policy")
|
||||
@@ -181,7 +174,7 @@ def load_manifest(path, setup_version):
|
||||
"release_on_main": boolean(data, "release_on_main", False),
|
||||
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
|
||||
"docs_only": boolean(data, "docs_only", False),
|
||||
"publish_context": publish_context, "platforms": platforms,
|
||||
"publish_context": publish_context,
|
||||
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy", "application-template")
|
||||
and not (profile == "qbit" and key in ("hotfix", "feature")))
|
||||
for key in publish_keys}}
|
||||
@@ -443,16 +436,9 @@ def cli_template(config, branch, tag):
|
||||
options = {"publish": publish, "filters": filters}
|
||||
if publish:
|
||||
options["context"] = [config["publish_context"]]
|
||||
platforms = config.get("platforms", [])
|
||||
jobs = [{"qqq-orb/cli_platform": {"name": "cli-" + p, "executor": CLI_PLATFORMS[p], "filters": copy.deepcopy(filters)}}
|
||||
for p in platforms]
|
||||
if publish and platforms:
|
||||
# Every opted-in platform must pass before packages are published.
|
||||
options["requires"] = ["cli-" + p for p in platforms]
|
||||
jobs.append({"qqq-orb/cli_verify_publish": options})
|
||||
# CLI docs are still verified until its generated-client inputs get a dedicated policy.
|
||||
return {"version": 2.1, "orbs": {"qqq-orb": "kingsrook/qqq-orb@" + config["orb_version"]},
|
||||
"workflows": {"publish_release" if publish else "test_only": {"jobs": jobs}}}
|
||||
"workflows": {"publish_release" if publish else "test_only": {"jobs": [{"qqq-orb/cli_verify_publish": options}]}}}
|
||||
|
||||
|
||||
def marketing_template(config, branch, tag):
|
||||
|
||||
@@ -64,7 +64,7 @@ echo "Publishing version: $VERSION"
|
||||
if [[ "$VERSION" =~ -RC\.[0-9]+$ ]]; then
|
||||
NPM_TAG="rc"
|
||||
echo "Detected RC version - using tag: $NPM_TAG"
|
||||
elif [[ "$VERSION" =~ -SNAPSHOT(\.[1-9][0-9]*)?$ ]]; then
|
||||
elif [[ "$VERSION" =~ -SNAPSHOT$ ]]; then
|
||||
NPM_TAG="snapshot"
|
||||
echo "Detected SNAPSHOT version - using tag: $NPM_TAG"
|
||||
elif [[ "$VERSION" =~ -(alpha|beta) ]]; then
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## It also pushes the changes back to the current branch.
|
||||
##
|
||||
## Process:
|
||||
## 1. Skips for feature and snapshot builds (ephemeral versions)
|
||||
## 1. Skips for feature branches (ephemeral versions)
|
||||
## 2. Checks if package.json has been modified
|
||||
## 3. Extracts the new version from package.json
|
||||
## 4. Commits the changes with skip ci flag
|
||||
@@ -22,12 +22,12 @@
|
||||
set -e
|
||||
|
||||
################################################################
|
||||
## Skip version commit for feature and snapshot builds ##
|
||||
## These versions are ephemeral and don't need to be ##
|
||||
## Skip version commit for feature branches ##
|
||||
## Feature versions are ephemeral and don't need to be ##
|
||||
## persisted back to the repository ##
|
||||
################################################################
|
||||
if [[ "$BRANCH_TYPE" == "feature" || "$BRANCH_TYPE" == "snapshot" ]]; then
|
||||
echo "Skipping version commit for $BRANCH_TYPE build (ephemeral version)"
|
||||
if [[ "$BRANCH_TYPE" == "feature" ]]; then
|
||||
echo "Skipping version commit for feature branch (ephemeral versions)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import base64
|
||||
import zlib
|
||||
CORE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtPdl22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QhFnbLkUw9zer4PfpzP+WUK7Lm4T5bG4n25GNY7aTLvZU5SanJmqaFXR6pJrbFElCWB9xKaoZHiwTweLBPOuadzi6fwdqUakpL87xQgR0QDigJ1ATF25ki0CAl/5fPH1y6V6fmOWVGroWEm7jcVvFRcrEyg29w7AHaitnYjs5yDRWh1925H9LvgUApq2wyzBliQjOnBiPQPuLSKH0I5O4F1a3e5TN37v/w6QAGpBU8NsHXrS1hDEfRRlN7jEQ3jiAVqcQJDXh2gec6v5NjVIazja01DoX9JuBmkvl4nn+I4H2QG2NeCR+jSerpDNskKwTLaWluUxftE/WLH4RKV6xYwkJMusri4lzRflDRKKTIba/VivRARCs4fB+qLsjJC9D0K+sQ4AHMu/G7YgLI00KyCk3/YS6sq2BLnoFcgWvL0iUm3g5zLk8SD/mOJ/VxOucr0P+WVtKe0Sq709siJsRn4Uw3sMwzHLats1mx6Ko4oq92aq4tSjdxv1bgld+M9Wbk+spcqOe8wHk41yrtpbhdRmWlwzXk7UMYmL93HeXn76+CZPOj/oAEPDQdyJHY8hb2G99RWvWVaVSixagb0ni94pXrLine truncated
|
||||
MATERIAL_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNq1lMtugzAQRfd8heV1TNRKlar8QXdVt02EXDMhDthGfqRBiH/vQAmPvKRU6g7PjH3PXI+pI0IoHEEEb6yjK1JjAENlwatvK7OdH2IYTY3IwWLks4+QIdflpeIZYJoqYWMlhTXObH0sjFqOB64OT/HLa/zM9lypig77m/5rE51WzaKl25uvq2CJB+fdFO/UR0swaWBxyjsPpZvRU7EDkZswFp11ZFHDWEgEx8qJVp/OoZof2Md1qViKYqyuSSfhgiJrWnKRo0OsQB/jvTN6TUnTTLTPt9NZZjNZNaNvt9CDvgTWXHUX9Kad50VBUAV0ClpIcGccFK9NcZ225QhEhCSMFZBxUbESwHaE9CEkxw/3rOyV/uwcVvnd9fswKSTKpKEA92+efgRN3oexIwfpAi+IhQyHyEmjye/A3nP5SMa57cof9LebVW693HIxexsTg+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wW3nIpXVMiLgkHOxgEFVnpUoBs87k0NtF+Ez81yZ6ekq3AJvme/OEDpPL/Wcly/xz9BYMn66JmwPhWZY7NhFADAhgFkj9aEtQorKMydRfr5C1vLOIdh8uroYX3y/jn1++vSk2EY3k1CjpQKYNqnvsayKBJhEyrHJu4PioH2qWLNkM+gur5NFJv0JH9CSSGStAbt3PCkmCcxKsyByEHkDBRM4cUn6Fe23AljBt1AISVxNhcqpMAjcuxa4hqQPrUEG3rS+i5MzHW8X5UuorO3qewf/DTp3nXKRlo3BgHE8IVqqMe6Y5iTLgPSUgfVsjqaXOSDVwJAiw7t8gA6GS5ZQ3ebfWUI52dRZcujqF1VefE69m8CjhFWU2y4CN88sXp6CFWtf3xp365uP63imznAp1d2CHK5O3t7da9tHza1iuEdM6LqXv+4wWOGzcXgJTE8MkWnIo5zd4JtFob3jYfxvSFmDTa7M5NnuCSUmx3ilkKxcWB8hr5w653z69PH4v/SabCcM1uHcHhJZel6sRGJhx68w6SAykIB1nwu6qH/f+V/9p+KsYvQ8+jt9FUb/1cRwML5rDyafu/nuvacD+2Hc2nT/snNGl")))
|
||||
ALL_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNq1T7EOgjAU3PmKpjNIdHQyJg4ukmDiYkwDUkxt4UkLEkP4dwsSUojootu7u/fu7lUWQvhOpWKQ4iVazOZ2w4AMlYaVnjXKsszRjCYwZ+lFSQDuduSKEM9fk8PG32+9HSFYn9StRwmSxwJKw0gHsfjhBGnkqAQ47RWtXaGNPHYY9YpZwQ2EIC8X47bbSYOkccRhwUTUhuRU5dhYqvu5rfglZ1xxFHMGSbE91G4SYiYmZUmzgkk6/LPTplsjdPrXD3EhxIcf3sk//sEy1QbVVm09Ad15mhY=")))
|
||||
STARTER_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNp1UMGKwkAMvc9XlDmKtejR0yJ42MsKCl5EQnUzZbbTiZ0ZqiL9d1OpWqt7y3t5eS/JRUSRrNB5TVZOo8loPGwYcjvP8MI1o7IsY2aYkLm2mXdEedKSXwCL5QzW8+Xqe/EDIHmkvnkcyeXK0LFjFNAHIGvOD4rJP7plbVocPTrd7KSoLHwab2V7Kg7aIOxQkUPgi7RqZCo1Hod9rQ14Ci+ZnbQirdDGDjPtgzvHe4e/aINmI/ki3/ZslTaBH/m2W3N3mn3iuaMzy/s2n01Gg0T2BLX4Dz3re7UVd1SLWlwByepyJQ==")))
|
||||
@@ -64,10 +64,6 @@ def boolean(data, key, default):
|
||||
return value
|
||||
|
||||
|
||||
# Opt-in CLI platform lanes: manifest entry -> orb executor.
|
||||
CLI_PLATFORMS = {"macos-arm64": "qqq-orb/cli_macos_arm64", "windows-x64": "qqq-orb/cli_windows_x64"}
|
||||
|
||||
|
||||
def load_manifest(path, setup_version):
|
||||
raw = Path(path).read_text(encoding="utf-8")
|
||||
if len(raw) > 65536:
|
||||
@@ -88,7 +84,7 @@ def load_manifest(path, setup_version):
|
||||
if profile == "qbit":
|
||||
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
|
||||
elif profile == "cli":
|
||||
allowed += ("publish_context", "platforms")
|
||||
allowed += ("publish_context",)
|
||||
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "application-template"):
|
||||
allowed = ("profile", "orb_version", "default_branch")
|
||||
elif profile == "all":
|
||||
@@ -163,9 +159,6 @@ def load_manifest(path, setup_version):
|
||||
raise ManifestError("CLI publication requires an explicitly verified context")
|
||||
if profile == "cli" and boolean(data, "docs_only", False):
|
||||
raise ManifestError("CLI currently requires full generated-client verification")
|
||||
platforms = data.get("platforms", [])
|
||||
if not isinstance(platforms, list) or any(not isinstance(x, str) or x not in CLI_PLATFORMS for x in platforms) or len(platforms) != len(set(platforms)):
|
||||
raise ManifestError("platforms must be distinct entries of " + ", ".join(CLI_PLATFORMS))
|
||||
tag_policy = data.get("release_tag_policy", "stable")
|
||||
if tag_policy not in ("stable", "v-prefix", "none"):
|
||||
raise ManifestError("Unsupported QBit release tag policy")
|
||||
@@ -181,7 +174,7 @@ def load_manifest(path, setup_version):
|
||||
"release_on_main": boolean(data, "release_on_main", False),
|
||||
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
|
||||
"docs_only": boolean(data, "docs_only", False),
|
||||
"publish_context": publish_context, "platforms": platforms,
|
||||
"publish_context": publish_context,
|
||||
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy", "application-template")
|
||||
and not (profile == "qbit" and key in ("hotfix", "feature")))
|
||||
for key in publish_keys}}
|
||||
@@ -443,16 +436,9 @@ def cli_template(config, branch, tag):
|
||||
options = {"publish": publish, "filters": filters}
|
||||
if publish:
|
||||
options["context"] = [config["publish_context"]]
|
||||
platforms = config.get("platforms", [])
|
||||
jobs = [{"qqq-orb/cli_platform": {"name": "cli-" + p, "executor": CLI_PLATFORMS[p], "filters": copy.deepcopy(filters)}}
|
||||
for p in platforms]
|
||||
if publish and platforms:
|
||||
# Every opted-in platform must pass before packages are published.
|
||||
options["requires"] = ["cli-" + p for p in platforms]
|
||||
jobs.append({"qqq-orb/cli_verify_publish": options})
|
||||
# CLI docs are still verified until its generated-client inputs get a dedicated policy.
|
||||
return {"version": 2.1, "orbs": {"qqq-orb": "kingsrook/qqq-orb@" + config["orb_version"]},
|
||||
"workflows": {"publish_release" if publish else "test_only": {"jobs": jobs}}}
|
||||
"workflows": {"publish_release" if publish else "test_only": {"jobs": [{"qqq-orb/cli_verify_publish": options}]}}}
|
||||
|
||||
|
||||
def marketing_template(config, branch, tag):
|
||||
|
||||
@@ -28,17 +28,13 @@ if [[ "$CURRENT_BRANCH" == "main" ]]; then
|
||||
TARGET_VERSION="$MAJOR_MINOR.0"
|
||||
echo "Main branch detected - targeting release version: $TARGET_VERSION"
|
||||
elif [[ "$CURRENT_BRANCH" == "develop" ]]; then
|
||||
# Snapshot coordinates are unique per CI job without pushing a version commit.
|
||||
# The source head stays the head whose required checks are being reported.
|
||||
if [[ ! "${CIRCLE_BUILD_NUM:-}" =~ ^[1-9][0-9]*$ ]]; then
|
||||
echo "ERROR: Snapshot publication requires a positive CIRCLE_BUILD_NUM" >&2
|
||||
exit 1
|
||||
fi
|
||||
# Develop branch - should be a snapshot version (e.g., 1.0.127-SNAPSHOT)
|
||||
# Increment patch version for develop
|
||||
MAJOR_MINOR_PATCH="${NPM_VERSION%-*}"
|
||||
MAJOR_MINOR="${MAJOR_MINOR_PATCH%.*}"
|
||||
PATCH="${MAJOR_MINOR_PATCH##*.}"
|
||||
NEW_PATCH=$((PATCH + 1))
|
||||
TARGET_VERSION="$MAJOR_MINOR.$NEW_PATCH-SNAPSHOT.$CIRCLE_BUILD_NUM"
|
||||
TARGET_VERSION="$MAJOR_MINOR.$NEW_PATCH-SNAPSHOT"
|
||||
echo "Develop branch detected - targeting snapshot version: $TARGET_VERSION"
|
||||
elif [[ "$CURRENT_BRANCH" == release/* ]]; then
|
||||
# Release branch - should be a release candidate (e.g., 1.0.0-RC.1, 1.0.0-RC.2, etc.)
|
||||
|
||||
@@ -46,24 +46,6 @@
|
||||
"destination": "quality-and-coverage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_artifacts": {
|
||||
"path": "target/checkstyle-result.xml",
|
||||
"destination": "quality-and-coverage/checkstyle-result.xml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_artifacts": {
|
||||
"path": "target/spotbugsXml.xml",
|
||||
"destination": "quality-and-coverage/spotbugsXml.xml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_artifacts": {
|
||||
"path": "target/pmd.xml",
|
||||
"destination": "quality-and-coverage/pmd.xml"
|
||||
}
|
||||
},
|
||||
{
|
||||
"persist_to_workspace": {
|
||||
"root": ".",
|
||||
@@ -77,7 +59,8 @@
|
||||
"Dockerfile",
|
||||
"pom.xml",
|
||||
"src",
|
||||
".config"
|
||||
".config",
|
||||
"sonar-project.properties"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -176,6 +159,32 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"sonar-scan": {
|
||||
"machine": {
|
||||
"image": "ubuntu-2204:current"
|
||||
},
|
||||
"resource_class": "medium",
|
||||
"steps": [
|
||||
"checkout",
|
||||
{
|
||||
"attach_workspace": {
|
||||
"at": "."
|
||||
}
|
||||
},
|
||||
{
|
||||
"qqq-orb/install_java": {
|
||||
"java_version": "21"
|
||||
}
|
||||
},
|
||||
"qqq-orb/mvn_cache_restore",
|
||||
{
|
||||
"run": {
|
||||
"name": "SonarCloud Analysis",
|
||||
"command": "mvn -B sonar:sonar \\\n -Dsonar.projectKey=qrun-io_voyage \\\n -Dsonar.organization=qrun-io \\\n -Dsonar.host.url=https://sonarcloud.io \\\n -Dsonar.token=${SONAR_TOKEN} \\\n -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \\\n -Dsonar.scm.disabled=true\n"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"docker-build": {
|
||||
"machine": {
|
||||
"image": "ubuntu-2204:current"
|
||||
@@ -232,6 +241,27 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"update-cd-repo": {
|
||||
"docker": [
|
||||
{
|
||||
"image": "cimg/base:current"
|
||||
}
|
||||
],
|
||||
"resource_class": "small",
|
||||
"steps": [
|
||||
{
|
||||
"setup_remote_docker": {
|
||||
"version": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Update CD repo with new image digest",
|
||||
"command": "echo \"${GHCR_TOKEN}\" | docker login ghcr.io -u \"${GHCR_USERNAME}\" --password-stdin\n\nIMAGE_DIGEST=$(docker manifest inspect ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7} --verbose 2>/dev/null | jq -r '.Descriptor.digest // empty' || true)\n\nif [ -z \"${IMAGE_DIGEST}\" ]; then\n docker pull ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7}\n IMAGE_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/qrun-io/voyage:${CIRCLE_SHA1:0:7} | cut -d@ -f2)\nfi\n\necho \"Image digest: ${IMAGE_DIGEST}\"\n\nif [ -z \"${IMAGE_DIGEST}\" ]; then\n echo \"ERROR: Could not determine image digest\"\n exit 1\nfi\n\ngit clone --branch main https://${GITHUB_TOKEN}@github.com/QRun-IO/Voyage-CD-Pipeline.git\ncd Voyage-CD-Pipeline\n\nsed -i \"s|digest: sha256:.*|digest: ${IMAGE_DIGEST}|\" overlays/production/kustomization.yaml\n\nif git diff --quiet overlays/production/kustomization.yaml; then\n echo \"No changes to commit - digest already up to date\"\n exit 0\nfi\n\ngit config user.name \"CircleCI\"\ngit config user.email \"ci@qrun.io\"\ngit add overlays/production/kustomization.yaml\ngit commit -m \"chore(production): update voyage image to ${CIRCLE_SHA1:0:7}\"\ngit push origin main\n\necho \"Successfully updated CD repo with new image digest\"\n"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"release-please": {
|
||||
"docker": [
|
||||
{
|
||||
@@ -244,7 +274,7 @@
|
||||
{
|
||||
"run": {
|
||||
"name": "Run release-please",
|
||||
"command": "set -euo pipefail\nnpx release-please github-release \\\n --token=${GITHUB_TOKEN} \\\n --target-branch=main \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\nnpx release-please release-pr \\\n --token=${GITHUB_TOKEN} \\\n --target-branch=main \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\n"
|
||||
"command": "npx release-please github-release \\\n --token=${GITHUB_TOKEN} \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\nnpx release-please release-pr \\\n --token=${GITHUB_TOKEN} \\\n --repo-url=QRun-IO/voyage \\\n --release-type=maven \\\n --package-name=voyage\n"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -260,6 +290,7 @@
|
||||
"ignore": [
|
||||
"main",
|
||||
"develop",
|
||||
"/^release-please--.*/",
|
||||
"/^release\\/.*/"
|
||||
]
|
||||
}
|
||||
@@ -273,6 +304,7 @@
|
||||
"ignore": [
|
||||
"main",
|
||||
"develop",
|
||||
"/^release-please--.*/",
|
||||
"/^release\\/.*/"
|
||||
]
|
||||
}
|
||||
@@ -286,6 +318,7 @@
|
||||
"ignore": [
|
||||
"main",
|
||||
"develop",
|
||||
"/^release-please--.*/",
|
||||
"/^release\\/.*/"
|
||||
]
|
||||
}
|
||||
@@ -302,6 +335,7 @@
|
||||
"ignore": [
|
||||
"main",
|
||||
"develop",
|
||||
"/^release-please--.*/",
|
||||
"/^release\\/.*/"
|
||||
]
|
||||
}
|
||||
@@ -351,6 +385,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"sonar-scan": {
|
||||
"context": [
|
||||
"sonarcloud"
|
||||
],
|
||||
"requires": [
|
||||
"build-and-test"
|
||||
],
|
||||
"filters": {
|
||||
"branches": {
|
||||
"only": "develop"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"sbom": {
|
||||
"context": [
|
||||
@@ -439,6 +488,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"sonar-scan": {
|
||||
"context": [
|
||||
"sonarcloud"
|
||||
],
|
||||
"requires": [
|
||||
"build-and-test"
|
||||
],
|
||||
"filters": {
|
||||
"branches": {
|
||||
"only": [
|
||||
"main",
|
||||
"/^release\\/.*/"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"sbom": {
|
||||
"context": [
|
||||
@@ -479,9 +546,10 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"munitor/update_cd_repo": {
|
||||
"update-cd-repo": {
|
||||
"context": [
|
||||
"github"
|
||||
"github",
|
||||
"ghcr"
|
||||
],
|
||||
"requires": [
|
||||
"docker-build"
|
||||
@@ -490,21 +558,7 @@
|
||||
"branches": {
|
||||
"only": "main"
|
||||
}
|
||||
},
|
||||
"name": "update-cd-repo",
|
||||
"cd_repo": "KofTwentyTwo/cluster-gitops",
|
||||
"environment": "prod",
|
||||
"cd_format": "kustomize",
|
||||
"cd_image_name": "ghcr.io/qrun-io/voyage",
|
||||
"cd_path": "tenants/voyage/kustomization.yaml",
|
||||
"pre-steps": [
|
||||
{
|
||||
"run": {
|
||||
"name": "Use the image published for this commit",
|
||||
"command": "set -euo pipefail\n[[ \"$CIRCLE_SHA1\" =~ ^[0-9a-f]{40}$ ]]\nprintf \"export PROJECT_VERSION='%s'\\n\" \"${CIRCLE_SHA1:0:7}\" >> \"$BASH_ENV\"\n"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -526,7 +580,6 @@
|
||||
}
|
||||
},
|
||||
"orbs": {
|
||||
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__",
|
||||
"munitor": "kof22/munitor@0.3.11"
|
||||
"qqq-orb": "kingsrook/qqq-orb@__ORB_VERSION__"
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ scripts=$(cd "$(dirname "${BASH_SOURCE[0]}")/../src/scripts" && pwd)
|
||||
scratch=$(mktemp -d)
|
||||
trap 'rm -rf "$scratch"' EXIT
|
||||
cd "$scratch"
|
||||
mkdir -p bin node_modules/.bin packages/{ui-api-client,core,conformance,cli}/src
|
||||
mkdir -p bin node_modules/.bin packages/{ui-api-client,conformance,cli}/src
|
||||
export CLI_LOG="$scratch/commands" PRISM_PID_FILE="$scratch/prism-pid" CONFIG_PATH_FILE="$scratch/npm-config-path"
|
||||
cat > bin/npm <<'STUB'
|
||||
#!/bin/bash
|
||||
@@ -35,7 +35,7 @@ chmod +x bin/* node_modules/.bin/prism
|
||||
export PATH="$scratch/bin:$PATH"
|
||||
: > "$CLI_LOG"
|
||||
bash "$scripts/cli_verify.sh"
|
||||
[[ "$(cat "$CLI_LOG")" == $'run generate\nrun build\ntest\nrun lint' ]]
|
||||
[[ "$(cat "$CLI_LOG")" == $'run generate\nrun build\ntest' ]]
|
||||
if [[ -e "$PRISM_PID_FILE" ]] && kill -0 "$(cat "$PRISM_PID_FILE")" 2>/dev/null; then
|
||||
echo 'Prism process survived cleanup' >&2
|
||||
exit 1
|
||||
@@ -51,37 +51,20 @@ if [[ -e "$PRISM_PID_FILE" ]] && kill -0 "$(cat "$PRISM_PID_FILE")" 2>/dev/null;
|
||||
echo 'Prism process survived cleanup' >&2
|
||||
exit 1
|
||||
fi
|
||||
write_packages() {
|
||||
local core_version=$1 core_dependency=$2 client_version=${3:-1.6.0-rc.1} cli_version=${4:-0.1.0-rc.1} item dir name version
|
||||
for item in "ui-api-client qqq-ui-api-client $client_version" "core qqq-core $core_version" "conformance qqq-ui-api-conformance $client_version" "cli qqq-cli $cli_version"; do
|
||||
read -r dir name version <<< "$item"
|
||||
printf '{"name":"@qrun-io/%s","version":"%s","publishConfig":{"registry":"https://npm.pkg.github.com"},"dependencies":{"@qrun-io/qqq-core":"%s"}}\n' "$name" "$version" "$core_dependency" > "packages/$dir/package.json"
|
||||
done
|
||||
}
|
||||
write_packages 0.1.0-rc.1 0.1.0-rc.1
|
||||
for item in 'ui-api-client qqq-ui-api-client 1.6.0-rc.1' 'conformance qqq-ui-api-conformance 1.6.0-rc.1' 'cli qqq-cli 0.1.0-rc.1'; do
|
||||
read -r dir name version <<< "$item"
|
||||
printf '{"name":"@qrun-io/%s","version":"%s","publishConfig":{"registry":"https://npm.pkg.github.com"}}\n' "$name" "$version" > "packages/$dir/package.json"
|
||||
done
|
||||
export CIRCLE_TAG=v1.6.0-rc.1 GITHUB_TOKEN=test-not-a-credential
|
||||
: > "$CLI_LOG"
|
||||
bash "$scripts/cli_publish.sh"
|
||||
[[ "$(grep '^publish ' "$CLI_LOG" | cut -d' ' -f3)" == $'@qrun-io/qqq-ui-api-client\n@qrun-io/qqq-core\n@qrun-io/qqq-ui-api-conformance\n@qrun-io/qqq-cli' ]]
|
||||
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 4 ]]
|
||||
# Final versions publish as latest; any prerelease among the four keeps rc.
|
||||
write_packages 1.0.0 1.0.0 1.6.0 1.0.0
|
||||
: > "$CLI_LOG"
|
||||
CIRCLE_TAG=v1.6.0 bash "$scripts/cli_publish.sh"
|
||||
[[ $(grep -c -- '--tag latest$' "$CLI_LOG") -eq 4 ]]
|
||||
[[ $(grep -c '^publish ' "$CLI_LOG") -eq 4 ]]
|
||||
write_packages 1.0.0 1.0.0 1.6.0-rc.3 1.0.0
|
||||
: > "$CLI_LOG"
|
||||
CIRCLE_TAG=v1.6.0-rc.3 bash "$scripts/cli_publish.sh"
|
||||
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 4 ]]
|
||||
[[ $(grep -c '^publish ' "$CLI_LOG") -eq 3 ]]
|
||||
[[ $(grep -c -- '--tag rc$' "$CLI_LOG") -eq 3 ]]
|
||||
[[ $(grep -c '^test$' "$CLI_LOG" || true) -eq 0 ]]
|
||||
[[ ! -e "$(cat "$CONFIG_PATH_FILE")" ]]
|
||||
for condition in wrong-tag missing-token denied-auth core-version core-dependency; do
|
||||
for condition in wrong-tag missing-token denied-auth; do
|
||||
: > "$CLI_LOG"
|
||||
write_packages 0.1.0-rc.1 0.1.0-rc.1
|
||||
case "$condition" in
|
||||
core-version) write_packages 0.1.0-rc.2 0.1.0-rc.2; if bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
|
||||
core-dependency) write_packages 0.1.0-rc.1 0.1.0-rc.0; if bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
|
||||
wrong-tag) if CIRCLE_TAG=v0.1.0 bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
|
||||
missing-token) if GITHUB_TOKEN='' bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
|
||||
denied-auth) if FAIL_AUTH=true bash "$scripts/cli_publish.sh" >/dev/null 2>&1; then exit 1; fi ;;
|
||||
@@ -91,4 +74,4 @@ for condition in wrong-tag missing-token denied-auth core-version core-dependenc
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
printf 'PASS: CLI validation once, drift/test/smoke failures, cleanup, tag/core-version/auth checks and four rc/latest publishes (stubbed)\n'
|
||||
printf 'PASS: CLI validation once, drift/test/smoke failures, cleanup, tag/auth checks and three rc publishes (stubbed)\n'
|
||||
@@ -10,7 +10,7 @@ class CliContract(unittest.TestCase):
|
||||
def test_single_full_validation_and_opt_in_publication(self):
|
||||
config = yaml.safe_load((ROOT / "src/jobs/cli_verify_publish.yml").read_text())
|
||||
self.assertIs(config["parameters"]["publish"]["default"], False)
|
||||
self.assertEqual(config["docker"], [{"image": "cimg/node:22.23"}])
|
||||
self.assertEqual(config["docker"], [{"image": "cimg/node:22.12"}])
|
||||
steps = config["steps"]
|
||||
ci = [i for i, s in enumerate(steps) if isinstance(s, dict) and s.get("run", {}).get("command") == "npm ci"]
|
||||
verify = [i for i, s in enumerate(steps) if "scripts/cli_verify.sh" in str(s)]
|
||||
@@ -24,18 +24,6 @@ class CliContract(unittest.TestCase):
|
||||
cache = next(s["save_cache"] for s in steps if isinstance(s, dict) and "save_cache" in s)
|
||||
self.assertEqual(cache["paths"], ["~/.npm"])
|
||||
|
||||
def test_platform_lane_runs_install_build_test_and_lint(self):
|
||||
config = yaml.safe_load((ROOT / "src/jobs/cli_platform.yml").read_text())
|
||||
self.assertEqual(config["executor"], "<< parameters.executor >>")
|
||||
self.assertEqual(config["parameters"]["executor"]["type"], "executor")
|
||||
commands = [s["run"]["command"] if isinstance(s["run"], dict) else s["run"]
|
||||
for s in config["steps"] if isinstance(s, dict) and "run" in s]
|
||||
self.assertIn("npm ci", commands)
|
||||
self.assertEqual(commands[-1], "npm run build && npm test && npm run lint")
|
||||
self.assertNotIn("publish", str(config))
|
||||
for name in ("cli_macos_arm64", "cli_windows_x64"):
|
||||
self.assertTrue((ROOT / "src/executors" / (name + ".yml")).exists())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -766,33 +766,6 @@ class PipelineTests(unittest.TestCase):
|
||||
if PACKED:
|
||||
self.assertEqual(self.render(), self.render(packed=True))
|
||||
|
||||
def test_cli_platform_lanes_are_opt_in_and_gate_publication(self):
|
||||
self.write_manifest(profile="cli", default_branch="main")
|
||||
jobs = self.render(CIRCLE_BRANCH="main")["workflows"]["test_only"]["jobs"]
|
||||
self.assertEqual([next(iter(job)) for job in jobs], ["qqq-orb/cli_verify_publish"])
|
||||
for invalid in (["linux-x64"], ["macos-arm64", "macos-arm64"], "macos-arm64", [{"macos-arm64": True}]):
|
||||
self.write_manifest(profile="cli", default_branch="main", platforms=invalid)
|
||||
self.render(ok=False)
|
||||
self.write_manifest(profile="qbit", platforms=["macos-arm64"])
|
||||
self.render(ok=False)
|
||||
self.write_manifest(profile="cli", default_branch="main", platforms=["macos-arm64", "windows-x64"])
|
||||
jobs = self.render(CIRCLE_BRANCH="main")["workflows"]["test_only"]["jobs"]
|
||||
lanes = [job["qqq-orb/cli_platform"] for job in jobs[:2]]
|
||||
self.assertEqual([(lane["name"], lane["executor"]) for lane in lanes],
|
||||
[("cli-macos-arm64", "qqq-orb/cli_macos_arm64"), ("cli-windows-x64", "qqq-orb/cli_windows_x64")])
|
||||
verify = jobs[2]["qqq-orb/cli_verify_publish"]
|
||||
self.assertNotIn("requires", verify)
|
||||
self.assertTrue(all(lane["filters"] == verify["filters"] for lane in lanes))
|
||||
self.write_manifest(profile="cli", default_branch="main", platforms=["windows-x64"],
|
||||
publish={"release": True}, publish_context="verified-packages")
|
||||
self.git("tag", "v1.0.0-RC.2")
|
||||
jobs = self.render(CIRCLE_TAG="v1.0.0-RC.2")["workflows"]["publish_release"]["jobs"]
|
||||
self.assertEqual(jobs[0]["qqq-orb/cli_platform"]["name"], "cli-windows-x64")
|
||||
self.assertNotIn("context", jobs[0]["qqq-orb/cli_platform"])
|
||||
self.assertEqual(jobs[1]["qqq-orb/cli_verify_publish"]["requires"], ["cli-windows-x64"])
|
||||
if PACKED:
|
||||
self.assertEqual(self.render(CIRCLE_TAG="v1.0.0-RC.2"), self.render(packed=True, CIRCLE_TAG="v1.0.0-RC.2"))
|
||||
|
||||
def test_voyage_selected_workflow_retains_all_filters_and_actions(self):
|
||||
self.write_manifest(profile="voyage")
|
||||
template = json.loads(json.dumps(pipeline.VOYAGE_TEMPLATE).replace("__ORB_VERSION__", "0.7.0"))
|
||||
@@ -804,16 +777,18 @@ class PipelineTests(unittest.TestCase):
|
||||
expected = copy.deepcopy(template)
|
||||
expected["workflows"] = {"verify": expected["workflows"][selected]}
|
||||
self.assertEqual(expected, result)
|
||||
jobs = {next(iter(job.values())).get("name", next(iter(job))): next(iter(job.values())) for job in result["workflows"]["verify"]["jobs"]}
|
||||
jobs = {next(iter(job)): next(iter(job.values())) for job in result["workflows"]["verify"]["jobs"]}
|
||||
if selected == "release":
|
||||
for name in ("update-cd-repo", "release-please"):
|
||||
self.assertEqual({"branches": {"only": "main"}}, jobs[name]["filters"])
|
||||
self.assertNotIn("sonar", json.dumps(result).lower())
|
||||
if selected in ("release", "develop"):
|
||||
self.assertIn("sonar-scan", jobs)
|
||||
self.assertEqual(["sonarcloud"], jobs["sonar-scan"]["context"])
|
||||
|
||||
def test_voyage_owns_complete_template(self):
|
||||
self.write_manifest(profile="voyage")
|
||||
result = self.render(CIRCLE_BRANCH="release/1")
|
||||
self.assertEqual(len(result["jobs"]), 7)
|
||||
self.assertEqual(len(result["jobs"]), 9)
|
||||
self.assertEqual(list(result["workflows"]), ["verify"])
|
||||
self.assertNotIn("__ORB_VERSION__", json.dumps(result))
|
||||
self.assertEqual(result["orbs"]["qqq-orb"], "kingsrook/qqq-orb@0.7.0")
|
||||
|
||||
@@ -76,7 +76,6 @@ sys.exit(subprocess.run([os.environ['TEST_REAL_NODE'], *sys.argv[1:]], input=sou
|
||||
def test_tags_and_legacy_authentication(self):
|
||||
for trusted in [True, False]:
|
||||
for version, tag in [('1.0.0-RC.1', 'rc'), ('1.0.0-SNAPSHOT', 'snapshot'),
|
||||
('1.0.0-SNAPSHOT.101', 'snapshot'),
|
||||
('1.0.0-alpha.1', 'next'), ('1.0.0-beta.1', 'next'), ('1.0.0', 'latest')]:
|
||||
with self.subTest(trusted=trusted, version=version):
|
||||
result, args, oidc = self.run_publish(version, trusted)
|
||||
@@ -134,38 +133,5 @@ sys.exit(subprocess.run([os.environ['TEST_REAL_NODE'], *sys.argv[1:]], input=sou
|
||||
self.assertNotIn('Successfully published', result.stdout)
|
||||
|
||||
|
||||
class SnapshotVersionTests(unittest.TestCase):
|
||||
def test_snapshot_jobs_keep_source_head_and_publish_distinct_versions(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
def git(*args):
|
||||
return subprocess.check_output(['git', *args], cwd=root, text=True).strip()
|
||||
git('init', '-q', '-b', 'develop')
|
||||
source = '{"name": "snapshot-test", "version": "0.40.27-SNAPSHOT"}\n'
|
||||
package = root / 'package.json'
|
||||
package.write_text(source)
|
||||
git('add', 'package.json')
|
||||
git('-c', 'user.name=Test', '-c', 'user.email=test@example.invalid',
|
||||
'-c', 'commit.gpgsign=false', 'commit', '-qm', 'initial source')
|
||||
head = git('rev-parse', 'HEAD')
|
||||
for number in ('101', '102'):
|
||||
package.write_text(source)
|
||||
env = dict(os.environ, CIRCLE_BUILD_NUM=number, BRANCH_TYPE='snapshot')
|
||||
subprocess.run(['bash', str(SCRIPT.parent / 'sync-npm-version.sh')],
|
||||
cwd=root, env=env, check=True, capture_output=True)
|
||||
self.assertEqual(json.loads(package.read_text())['version'], '0.40.28-SNAPSHOT.' + number)
|
||||
subprocess.run(['bash', str(SCRIPT.parent / 'node_version_commit.sh')],
|
||||
cwd=root, env=env, check=True, capture_output=True)
|
||||
self.assertEqual(git('rev-parse', 'HEAD'), head)
|
||||
self.assertEqual(git('diff', '--cached', '--name-only'), '')
|
||||
for number in ('', '0', '01', '-1', 'abc'):
|
||||
package.write_text(source)
|
||||
result = subprocess.run(['bash', str(SCRIPT.parent / 'sync-npm-version.sh')],
|
||||
cwd=root, env=dict(os.environ, CIRCLE_BUILD_NUM=number),
|
||||
capture_output=True)
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
self.assertEqual(package.read_text(), source)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -1,45 +0,0 @@
|
||||
"""Voyage delegates live GitOps updates to the existing shared updater."""
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
TEMPLATE = json.loads((Path(__file__).resolve().parents[1] / "src/scripts/templates/voyage.json").read_text())
|
||||
|
||||
|
||||
class VoyageGitOps(unittest.TestCase):
|
||||
def test_live_target_uses_shared_updater_only_after_main_image_publication(self):
|
||||
self.assertNotIn('update-cd-repo', TEMPLATE['jobs'])
|
||||
self.assertEqual(TEMPLATE['orbs']['munitor'], 'kof22/munitor@0.3.11')
|
||||
invocations = [(workflow, entry['munitor/update_cd_repo'])
|
||||
for workflow, body in TEMPLATE['workflows'].items() for entry in body['jobs']
|
||||
if 'munitor/update_cd_repo' in entry]
|
||||
self.assertEqual(len(invocations), 1)
|
||||
workflow, options = invocations[0]
|
||||
self.assertEqual(workflow, 'release')
|
||||
self.assertEqual(options['cd_repo'], 'KofTwentyTwo/cluster-gitops')
|
||||
self.assertEqual(options['cd_path'], 'tenants/voyage/kustomization.yaml')
|
||||
self.assertEqual(options['cd_image_name'], 'ghcr.io/qrun-io/voyage')
|
||||
self.assertEqual(options['cd_format'], 'kustomize')
|
||||
self.assertEqual(options['requires'], ['docker-build'])
|
||||
self.assertEqual(options['context'], ['github'])
|
||||
self.assertEqual(options['filters'], {'branches': {'only': 'main'}})
|
||||
|
||||
def test_updater_receives_published_commit_tag_and_rejects_invalid_revision(self):
|
||||
options = next(entry['munitor/update_cd_repo'] for entry in TEMPLATE['workflows']['release']['jobs']
|
||||
if 'munitor/update_cd_repo' in entry)
|
||||
command = options['pre-steps'][0]['run']['command']
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
env_file = Path(directory) / 'bash-env'
|
||||
for revision in ('a' * 40, '', 'main', 'a' * 39):
|
||||
env_file.write_text('')
|
||||
env = {**os.environ, 'BASH_ENV': str(env_file), 'CIRCLE_SHA1': revision}
|
||||
result = subprocess.run(['bash', '-c', command], env=env, capture_output=True)
|
||||
if revision == 'a' * 40:
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
self.assertEqual(env_file.read_text(), "export PROJECT_VERSION='aaaaaaa'\n")
|
||||
else:
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
self.assertEqual(env_file.read_text(), '')
|
||||
@@ -28,7 +28,7 @@ def selected(branch):
|
||||
continue
|
||||
if "ignore" in filters and matches(filters["ignore"], branch):
|
||||
continue
|
||||
found.append((workflow, options.get("name", name), options))
|
||||
found.append((workflow, name, options))
|
||||
return found
|
||||
|
||||
|
||||
@@ -39,8 +39,7 @@ class VoyageContract(unittest.TestCase):
|
||||
jobs = selected(branch)
|
||||
self.assertEqual({w for w, _, _ in jobs}, {workflow})
|
||||
self.assertEqual([n for _, n, _ in jobs].count("build-and-test"), 1)
|
||||
self.assertEqual({n for _, n, _ in selected("release-please--branches--main")},
|
||||
{"build-and-test", "secrets-scan", "sast-scan", "security-scan"})
|
||||
self.assertEqual(selected("release-please--branches--main"), [])
|
||||
|
||||
def test_verify_owns_tests_quality_and_coverage_without_skips(self):
|
||||
jobs = TEMPLATE["jobs"]
|
||||
@@ -62,22 +61,16 @@ class VoyageContract(unittest.TestCase):
|
||||
paths = next(s["persist_to_workspace"]["paths"] for s in steps if isinstance(s, dict) and "persist_to_workspace" in s)
|
||||
for path in ("target/site", "target/jacoco.exec", "target/voyage.jar", "target/classes", "target/test-classes"):
|
||||
self.assertIn(path, paths)
|
||||
artifacts = [s["store_artifacts"]["path"] for s in steps if isinstance(s, dict) and "store_artifacts" in s]
|
||||
for path in ("target/site", "target/checkstyle-result.xml", "target/spotbugsXml.xml", "target/pmd.xml"):
|
||||
self.assertIn(path, artifacts)
|
||||
|
||||
def test_quality_requires_no_sonar_service_or_credentials(self):
|
||||
self.assertNotIn("sonar", json.dumps(TEMPLATE).lower())
|
||||
for branch in ("main", "develop", "release/1.0", "feature/example"):
|
||||
names = {name for _, name, _ in selected(branch)}
|
||||
self.assertTrue({"build-and-test", "secrets-scan", "sast-scan", "security-scan"}.issubset(names))
|
||||
sonar = json.dumps(TEMPLATE["jobs"]["sonar-scan"])
|
||||
self.assertIn("target/site/jacoco/jacoco.xml", sonar)
|
||||
self.assertIn("attach_workspace", sonar)
|
||||
|
||||
def test_all_workflow_dependencies_exist_and_preserve_release_boundaries(self):
|
||||
for workflow, body in TEMPLATE["workflows"].items():
|
||||
names = {next(iter(entry.values())).get("name", next(iter(entry))) for entry in body["jobs"]}
|
||||
names = {next(iter(entry)) for entry in body["jobs"]}
|
||||
for entry in body["jobs"]:
|
||||
name, options = next(iter(entry.items()))
|
||||
self.assertTrue(name in TEMPLATE["jobs"] or name == "munitor/update_cd_repo")
|
||||
self.assertIn(name, TEMPLATE["jobs"])
|
||||
self.assertTrue(set(options.get("requires", [])).issubset(names))
|
||||
for branch in ("feature/example", "release/1.0", "develop"):
|
||||
self.assertNotIn("update-cd-repo", [n for _, n, _ in selected(branch)])
|
||||
@@ -114,7 +107,7 @@ class VoyageContract(unittest.TestCase):
|
||||
self.assertIn('--exit-code 1', json.dumps(jobs["docker-build"]))
|
||||
self.assertIn('--severity CRITICAL,HIGH', json.dumps(jobs["docker-build"]))
|
||||
self.assertIn('ghcr.io/qrun-io/voyage', json.dumps(jobs["docker-build"]))
|
||||
self.assertNotIn('update-cd-repo', jobs)
|
||||
self.assertIn('overlays/production/kustomization.yaml', json.dumps(jobs["update-cd-repo"]))
|
||||
owasp = '\n'.join(s["run"]["command"] for s in jobs["security-scan"]["steps"] if isinstance(s, dict) and "run" in s)
|
||||
self.assertIn('--severity HIGH,CRITICAL --exit-code 1', owasp)
|
||||
self.assertIn('target/voyage.jar:/scan/voyage.jar:ro', owasp)
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
"""Execute Voyage release commands; CD implementation belongs to Munitor."""
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
TEMPLATE = json.loads((ROOT / "src/scripts/templates/voyage.json").read_text())
|
||||
COMMAND = next(step["run"]["command"] for step in TEMPLATE["jobs"]["release-please"]["steps"]
|
||||
if isinstance(step, dict) and "run" in step)
|
||||
|
||||
|
||||
class VoyageRelease(unittest.TestCase):
|
||||
def run_release(self, fail=False):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
npx = root / "npx"
|
||||
npx.write_text('''#!/usr/bin/env python3
|
||||
import json, os, sys
|
||||
with open(os.environ['EVENTS'], 'a') as output:
|
||||
output.write(json.dumps(sys.argv[1:])+'\\n')
|
||||
assert '--target-branch=main' in sys.argv
|
||||
if os.environ['FAILURE']=='true' and 'github-release' in sys.argv: sys.exit(25)
|
||||
''')
|
||||
npx.chmod(0o755)
|
||||
events = root / "events.jsonl"
|
||||
env = {**os.environ, "PATH": str(root) + os.pathsep + os.environ["PATH"],
|
||||
"EVENTS": str(events), "FAILURE": str(fail).lower(), "GITHUB_TOKEN": "fixture-token"}
|
||||
result = subprocess.run(["bash", "-c", COMMAND], cwd=root, env=env, capture_output=True, text=True)
|
||||
return result, [json.loads(line) for line in events.read_text().splitlines()]
|
||||
|
||||
def test_release_targets_main_for_both_commands(self):
|
||||
result, rows = self.run_release()
|
||||
self.assertEqual(result.returncode, 0, result.stderr)
|
||||
self.assertEqual([args[1] for args in rows], ['github-release', 'release-pr'])
|
||||
|
||||
def test_release_failure_is_not_hidden_by_second_command(self):
|
||||
result, rows = self.run_release(fail=True)
|
||||
self.assertEqual(result.returncode, 25, result.stderr)
|
||||
self.assertEqual(len(rows), 1)
|
||||
Reference in new issue
Block a user