Compare commits
65
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eeb76914ad
|
||
|
|
ad4644c917
|
||
|
|
39e7f3ef7f
|
||
|
|
3e64503fb4
|
||
|
|
3d3d0c60f4
|
||
|
|
a5477b95cd
|
||
|
|
a7c3b2a662 | ||
|
|
cabf224967 | ||
|
|
5d86b7cca6 | ||
|
|
58b1fd0f01 | ||
|
|
6ab85cc65b | ||
|
|
2056053ac0 | ||
|
|
8b138ce372 | ||
|
|
4c52053ee0 | ||
|
|
9b150f769b | ||
|
|
48d648751b | ||
|
|
266ee6db53 | ||
|
|
434be19c65 | ||
|
|
bf962c79d7 | ||
|
|
c77891e63d | ||
|
|
98eb544670 | ||
|
|
f001c73cb0 | ||
|
|
736ab0e985 | ||
|
|
ee3cc63cdd | ||
|
|
d61e7ac070 | ||
|
|
c8221161d4 | ||
|
|
4677cf8d17 | ||
|
|
bbca434b39 | ||
|
|
66b93dccce | ||
|
|
a53af9ca33 | ||
|
|
978d6939d7 | ||
|
|
0131a1f415 | ||
|
|
5bdda2f8c9 | ||
|
|
7b1756818f | ||
|
|
68f17d3b09 | ||
|
|
130bc35ab0 | ||
|
|
9b7161c3c8 | ||
|
|
482d72ce21 | ||
|
|
45a439796f | ||
|
|
02f0b93e41 | ||
|
|
5e433ec629 | ||
|
|
cec7a76f12 | ||
|
|
8717d3536e | ||
|
|
8229a66bc5 | ||
|
|
9687feb36c | ||
|
|
0fefe6a064 | ||
|
|
2956e3ffce | ||
|
|
0afe2a231f | ||
|
|
65265e48a4 | ||
|
|
49399deb3d | ||
|
|
9fe4257490 | ||
|
|
0965a45653 | ||
|
|
bfd41c8e0d | ||
|
|
9c30a30754 | ||
|
|
ee8953bd93 | ||
|
|
5bc3167286 | ||
|
|
1a3368e119 | ||
|
|
1ddba883c9 | ||
|
|
da8044d6f2 | ||
|
|
67ba48da1f | ||
|
|
5196609974 | ||
|
|
49e09a6776 | ||
|
|
748016f105 | ||
|
|
6514aaa688 | ||
|
|
3ac47adc21 |
No files matched your search
@@ -1,22 +0,0 @@
|
||||
schema: 1
|
||||
scoped_delegation: true
|
||||
components:
|
||||
source:
|
||||
toolchains:
|
||||
node: 22.20.0
|
||||
build:
|
||||
tool: source
|
||||
commands:
|
||||
- - tracked-files
|
||||
verification:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- develop
|
||||
- hotfix/**
|
||||
- main
|
||||
- master
|
||||
- qualification/**
|
||||
- rc
|
||||
- release/**
|
||||
tags: []
|
||||
@@ -51,6 +51,7 @@ jobs:
|
||||
python3 scripts/pack_pipeline.py --check
|
||||
bash tests/test_cli_ci_behavior.sh
|
||||
python3 tests/test_cli_ci_contract.py
|
||||
python3 tests/test_esb_junit_staging.py
|
||||
python3 tests/test_maven_ci_contract.py
|
||||
python3 tests/test_standardize_qbit.py
|
||||
python3 tests/test_qbit_hotfix_profile.py
|
||||
@@ -100,6 +101,7 @@ jobs:
|
||||
bash tests/test_maven_test_results.sh
|
||||
bash tests/test_maven_ci_install.sh
|
||||
bash tests/test_browser_install.sh
|
||||
python3 tests/test_apt_fetch_policy.py
|
||||
bash tests/test_frontend_build_reuse.sh
|
||||
bash tests/test_snapshot_refresh.sh
|
||||
bash tests/test_maven_settings_output.sh
|
||||
|
||||
@@ -138,7 +138,16 @@ jobs:
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-${{ matrix.browser }}
|
||||
- run: pnpm exec playwright install-deps ${{ matrix.browser }}
|
||||
- name: Install browser system dependencies
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
# A continuously slow Azure mirror never trips APT's inactivity timeout.
|
||||
# Keep the runner's official HTTPS fallbacks and signed source configuration.
|
||||
sudo sed -i '\|^http://azure\.archive\.ubuntu\.com/ubuntu/|d' /etc/apt/apt-mirrors.txt
|
||||
printf '%s\n' 'Acquire::Retries "3";' 'Acquire::http::Timeout "30";' \
|
||||
'Acquire::https::Timeout "30";' 'APT::Update::Error-Mode "any";' \
|
||||
| sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
pnpm exec playwright install-deps ${{ matrix.browser }}
|
||||
- if: steps.browser-cache.outputs.cache-hit != 'true'
|
||||
run: pnpm exec playwright install ${{ matrix.browser }}
|
||||
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
@@ -250,7 +259,16 @@ jobs:
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-chromium
|
||||
- run: pnpm exec playwright install-deps chromium
|
||||
- name: Install browser system dependencies
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
# A continuously slow Azure mirror never trips APT's inactivity timeout.
|
||||
# Keep the runner's official HTTPS fallbacks and signed source configuration.
|
||||
sudo sed -i '\|^http://azure\.archive\.ubuntu\.com/ubuntu/|d' /etc/apt/apt-mirrors.txt
|
||||
printf '%s\n' 'Acquire::Retries "3";' 'Acquire::http::Timeout "30";' \
|
||||
'Acquire::https::Timeout "30";' 'APT::Update::Error-Mode "any";' \
|
||||
| sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
pnpm exec playwright install-deps chromium
|
||||
- if: steps.browser-cache.outputs.cache-hit != 'true'
|
||||
run: pnpm exec playwright install chromium
|
||||
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
|
||||
@@ -61,7 +61,16 @@ jobs:
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-chromium
|
||||
- run: pnpm exec playwright install-deps chromium
|
||||
- name: Install browser system dependencies
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
# A continuously slow Azure mirror never trips APT's inactivity timeout.
|
||||
# Keep the runner's official HTTPS fallbacks and signed source configuration.
|
||||
sudo sed -i '\|^http://azure\.archive\.ubuntu\.com/ubuntu/|d' /etc/apt/apt-mirrors.txt
|
||||
printf '%s\n' 'Acquire::Retries "3";' 'Acquire::http::Timeout "30";' \
|
||||
'Acquire::https::Timeout "30";' 'APT::Update::Error-Mode "any";' \
|
||||
| sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
pnpm exec playwright install-deps chromium
|
||||
- if: steps.browser-cache.outputs.cache-hit != 'true'
|
||||
run: pnpm exec playwright install chromium
|
||||
- name: Production build
|
||||
@@ -101,7 +110,16 @@ jobs:
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: playwright-${{ runner.os }}-${{ steps.playwright.outputs.version }}-all
|
||||
- run: pnpm exec playwright install-deps chromium firefox webkit
|
||||
- name: Install browser system dependencies
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
# A continuously slow Azure mirror never trips APT's inactivity timeout.
|
||||
# Keep the runner's official HTTPS fallbacks and signed source configuration.
|
||||
sudo sed -i '\|^http://azure\.archive\.ubuntu\.com/ubuntu/|d' /etc/apt/apt-mirrors.txt
|
||||
printf '%s\n' 'Acquire::Retries "3";' 'Acquire::http::Timeout "30";' \
|
||||
'Acquire::https::Timeout "30";' 'APT::Update::Error-Mode "any";' \
|
||||
| sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
pnpm exec playwright install-deps chromium firefox webkit
|
||||
- if: steps.browser-cache.outputs.cache-hit != 'true'
|
||||
run: pnpm exec playwright install chromium firefox webkit
|
||||
- name: Collaboration suite (mock API, every browser project)
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
# DRAFT ONLY - NOT INSTALLED, NOT EXECUTED. Public, review-only.
|
||||
# ONE-KEY NPM_TOKEN recovery variant of the reviewed qrun-secret-export workflow.
|
||||
# Target path (after a new explicit owner decision): .github/workflows/qrun-secret-export.yml
|
||||
# Delivery: normal Gitea PR onto develop, mirrored only by the existing dedicated shadow worker.
|
||||
# Fails closed until the three PLACEHOLDER values below are replaced:
|
||||
# NONCE, RECIPIENT_FPR, RECIPIENT_PUBLIC_PEM.
|
||||
name: qrun-secret-export (one-shot, one-key NPM recovery only)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
expected_head:
|
||||
description: "Full 40-hex SHA of develop HEAD; must equal github.sha"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions: {} # artifact upload uses the runtime token, not GITHUB_TOKEN
|
||||
|
||||
env:
|
||||
# Non-sensitive, reviewed constants (replaced at approval time).
|
||||
NONCE: "6281c98f7a28fef56930c368dc19b97d"
|
||||
RECIPIENT_FPR: "ed79db8053ad8b1c910994e71d07c4c914c76ebeda2eae9db6f38ecdae4fef6e"
|
||||
|
||||
concurrency:
|
||||
group: qrun-secret-export
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
export:
|
||||
if: >-
|
||||
github.repository == 'QRun-IO/qqq-orb' &&
|
||||
github.ref == format('refs/heads/{0}', github.event.repository.default_branch) &&
|
||||
github.ref_name == 'develop' &&
|
||||
github.sha == inputs.expected_head &&
|
||||
github.run_attempt == 1
|
||||
runs-on: ubuntu-24.04 # GitHub-hosted; never self-hosted
|
||||
timeout-minutes: 10
|
||||
permissions: {}
|
||||
steps:
|
||||
# No checkout. No repo code. No network install. Node built-in crypto only.
|
||||
- name: Encrypt NPM_TOKEN to recipient
|
||||
env:
|
||||
# Exactly this one, on this step only.
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
# Non-secret context.
|
||||
EXPECTED_HEAD: ${{ inputs.expected_head }}
|
||||
RUN_ATTEMPT: ${{ github.run_attempt }}
|
||||
RECIPIENT_PUBLIC_PEM: |
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEApnXE0AUAvxG+UO+lBbcl
|
||||
eH+3MSgyGKo4xb78Z2ObhtwrgQXkzHhsvzH90APyx/Yh4IAlQ1e1G9P59b4Is6Mh
|
||||
yaZ7zyu+KPP5vCeE3uO7CLd8M9EAp5i+1us9VyOoHhkM/klMXDITac/6Z6rMozAC
|
||||
0wPhauwF4T/nsJqX1BFycL0p4FdFTHoSqfHNjiaKpN5ov43ho8E6MHVCsc2CEt1X
|
||||
I99olcXFTybbCjHm8vjDrd/CepTHn26GQkwmxY2mKm43prcSC3uzHyL3nWg4uyKa
|
||||
QzTjx9ff7fgcoOXO9/exZv3r5GDdFzGwBHE49PklCEAvbiu6y0smO4UhjEz4r/DN
|
||||
6ratnC6UUqT3SQ3Zh+MkMIUAXi5AJfPELgUv5idSafPcOkjVd25VKP2LmqFvNecj
|
||||
0LWX5HSVhDYb3LZiHqR1KY/+fBamyArfhEhHghLL5nhUN+EV/ba5wQgpUeG+STg8
|
||||
NmBcvN1zhblS+KrhOJ7HZrthOfdck6GqgXQX0YSeFYSGdDG+pUI5XqJwJ6rOMLKD
|
||||
iTpxB1JWgGpQxx4WX3/rFL9NJk5vfSUeAHFUzvyC3b8YGTIjfe6R08IDJK8nMLU3
|
||||
gqSzFDkCldSq7nzr/psKmrw+6/+dYVEQ2ZD506+S3JGfcw3PzajYIWI65yAx7EIg
|
||||
qNefU2CCRfPthnjw4WJhXbECAwEAAQ==
|
||||
-----END PUBLIC KEY-----
|
||||
run: |
|
||||
node --input-type=commonjs - <<'NODE'
|
||||
const c = require('crypto');
|
||||
const fs = require('fs');
|
||||
const E = process.env;
|
||||
const NAMES = ['NPM_TOKEN'];
|
||||
const bad = (m) => { const e = new Error(m); e.safe = true; throw e; };
|
||||
let pt = null, aes = null;
|
||||
try {
|
||||
if (E.GITHUB_REPOSITORY !== 'QRun-IO/qqq-orb') bad('repository guard');
|
||||
if (E.RUN_ATTEMPT !== '1') bad('attempt guard');
|
||||
if (!/^[0-9a-f]{40}$/.test(E.EXPECTED_HEAD || '') || E.EXPECTED_HEAD !== E.GITHUB_SHA) bad('head guard');
|
||||
if (!/^[0-9a-f]{32}$/.test(E.NONCE || '')) bad('nonce unset');
|
||||
if (!/^[0-9a-f]{64}$/.test(E.RECIPIENT_FPR || '')) bad('recipient fingerprint unset');
|
||||
|
||||
let pub;
|
||||
try { pub = c.createPublicKey(E.RECIPIENT_PUBLIC_PEM); } catch { bad('recipient key unset'); }
|
||||
if (pub.asymmetricKeyType !== 'rsa' || pub.asymmetricKeyDetails.modulusLength !== 4096) bad('recipient key type');
|
||||
const spki = pub.export({ type: 'spki', format: 'der' });
|
||||
const spkiSha = c.createHash('sha256').update(spki).digest('hex');
|
||||
if (spkiSha !== E.RECIPIENT_FPR) bad('recipient fingerprint mismatch');
|
||||
|
||||
const body = {};
|
||||
for (const n of NAMES) {
|
||||
if (!Object.prototype.hasOwnProperty.call(E, n) || typeof E[n] !== 'string') bad('missing secret field');
|
||||
body[n] = E[n];
|
||||
}
|
||||
const prov = {
|
||||
repository: E.GITHUB_REPOSITORY,
|
||||
source_sha: E.GITHUB_SHA,
|
||||
run_id: E.GITHUB_RUN_ID,
|
||||
run_attempt: E.RUN_ATTEMPT,
|
||||
operation_nonce: E.NONCE,
|
||||
};
|
||||
pt = Buffer.from(JSON.stringify({ ...prov, secrets: body }), 'utf8');
|
||||
for (const n of NAMES) delete body[n];
|
||||
|
||||
aes = c.randomBytes(32);
|
||||
const iv = c.randomBytes(12);
|
||||
const aad = Buffer.from(`qrun-secret-export/v1|${spkiSha}|${E.NONCE}`, 'utf8');
|
||||
const cipher = c.createCipheriv('aes-256-gcm', aes, iv);
|
||||
cipher.setAAD(aad);
|
||||
const ct = Buffer.concat([cipher.update(pt), cipher.final()]);
|
||||
const tag = cipher.getAuthTag();
|
||||
// oaepHash sets both the OAEP digest and the MGF1 digest (SHA-256 each).
|
||||
const wrapped = c.publicEncrypt(
|
||||
{ key: pub, padding: c.constants.RSA_PKCS1_OAEP_PADDING, oaepHash: 'sha256' }, aes);
|
||||
|
||||
const envelope = {
|
||||
version: 1,
|
||||
alg: 'RSA-OAEP-SHA256-MGF1SHA256+AES-256-GCM',
|
||||
recipient_fingerprint: spkiSha,
|
||||
provenance: prov,
|
||||
wrapped_key: wrapped.toString('base64'),
|
||||
iv: iv.toString('base64'),
|
||||
tag: tag.toString('base64'),
|
||||
ciphertext: ct.toString('base64'),
|
||||
};
|
||||
// Only file written: ciphertext, owner-only, create-exclusive.
|
||||
fs.writeFileSync(`${E.RUNNER_TEMP}/${E.NONCE}.envelope.json`,
|
||||
JSON.stringify(envelope), { mode: 0o600, flag: 'wx' });
|
||||
console.log('envelope: written');
|
||||
} catch (e) {
|
||||
console.error('envelope: failed' + (e && e.safe ? ` (${e.message})` : ''));
|
||||
process.exitCode = 1;
|
||||
} finally {
|
||||
if (pt) pt.fill(0);
|
||||
if (aes) aes.fill(0);
|
||||
for (const n of NAMES) delete process.env[n];
|
||||
}
|
||||
NODE
|
||||
|
||||
- name: Upload ciphertext artifact
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
||||
with:
|
||||
name: qrun-envelope-${{ env.NONCE }}
|
||||
path: ${{ runner.temp }}/${{ env.NONCE }}.envelope.json # single explicit file
|
||||
retention-days: 1
|
||||
compression-level: 0
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Remove local ciphertext
|
||||
if: always()
|
||||
run: rm -f -- "${RUNNER_TEMP}/${NONCE}.envelope.json"
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ test-all: test test-scripts test-pipelines
|
||||
# PyYAML 6.0.3 is the same strict parser used by the setup job.
|
||||
test-pipelines: pack
|
||||
python3 tests/test_generate_pipeline.py --packed target/qqq-orb-packed.yml
|
||||
python3 tests/test_esb_junit_staging.py
|
||||
python3 tests/test_maven_ci_contract.py
|
||||
bash tests/test_cli_ci_behavior.sh
|
||||
python3 tests/test_cli_ci_contract.py
|
||||
@@ -70,6 +71,7 @@ test-pipelines: pack
|
||||
python3 tests/test_validate_standard.py
|
||||
python3 tests/test_voyage_profile.py
|
||||
python3 tests/test_next_native.py
|
||||
python3 tests/test_apt_fetch_policy.py
|
||||
python3 tests/test_auxiliary_workflows.py
|
||||
python3 tests/test_qbit_codeql.py
|
||||
python3 tests/test_repository_policy.py
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -170,26 +170,16 @@ rather than silently ignored on these profiles. Existing direct jobs remain usab
|
||||
|
||||
## 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
|
||||
`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, 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.
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# CI package fetch failures
|
||||
|
||||
Java bootstrap and Next browser dependency setup use APT's native three retries
|
||||
after the initial fetch, with 30-second HTTP/HTTPS inactivity timeouts. APT update
|
||||
fails if any required index cannot be downloaded; stale indexes must not silently
|
||||
turn an exhausted fetch into a successful setup. Signature and checksum checks
|
||||
remain enabled. Next dependency installation also has a ten-minute step limit.
|
||||
These settings retry downloads, not builds or tests. Existing required gates stay
|
||||
unchanged, and terminal APT errors retain the failing URL and HTTP status.
|
||||
|
||||
`python3 tests/test_apt_fetch_policy.py` uses actual apt-helper against a local
|
||||
HTTP fixture. It checks a normal download, recovery after two HTTP 503 responses,
|
||||
four-attempt exhaustion, immediate HTTP 404 failure, and checksum rejection.
|
||||
Run on Debian/Ubuntu with Python and APT; no external network is needed. The test
|
||||
is included in the existing CircleCI contract suite and `make test-pipelines`.
|
||||
|
||||
Validation performed locally: actual APT fixture in both python:3.12-slim and the
|
||||
cached Ubuntu Next CI image; existing Java/browser installation regression
|
||||
scripts; Next worker gate preservation tests; Maven CI contract tests; actionlint;
|
||||
shellcheck; YAML parsing; and orb packing. Official authenticated CircleCI schema
|
||||
validation is pending approval to transmit the configuration to CircleCI.
|
||||
|
||||
Related: QRun-IO/qqq#1307. No release rerun or successful full-browser-matrix claim
|
||||
is implied by these local checks. Publish and adopt the shared workflow change
|
||||
before rerunning the current frontend candidate's full acceptance matrix.
|
||||
|
||||
The hosted Next workers also remove the Azure HTTP entry from the runner's
|
||||
`/etc/apt/apt-mirrors.txt`, retaining its official archive/security HTTPS fallbacks.
|
||||
Run 39840989837 downloaded 25.9 MB at 43.5 kB/s for almost ten minutes: continuous
|
||||
progress bypassed inactivity timeouts and exhausted the setup budget. Retrying
|
||||
that same mirror cannot address this failure. Source suites, components, signing
|
||||
keys and signature/checksum verification remain unchanged. A fixture executes
|
||||
the actual mirror edit twice and verifies both HTTPS entries survive unchanged.
|
||||
Hosted acceptance must still establish that this fixes the observed bottleneck.
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Embed profile resources before Circle packs/interpolates its own syntax."""
|
||||
import base64
|
||||
import re
|
||||
from pathlib import Path
|
||||
import sys
|
||||
import zlib
|
||||
@@ -19,8 +20,15 @@ for variable, name in (("CORE_TEMPLATE", "core"), ("MATERIAL_TEMPLATE", "fronten
|
||||
packed = text[:start] + "\n".join(embedded) + text[end:]
|
||||
if len(packed.encode("utf-8")) > 100_000:
|
||||
sys.exit("Packed generator exceeds the tested CircleCI command-argument budget")
|
||||
def comparable_resources(value):
|
||||
"""Compare source bytes, not zlib's platform/version-dependent bitstream."""
|
||||
pattern = r'([A-Z_]+) = json\.loads\(zlib\.decompress\(base64\.b64decode\("([A-Za-z0-9+/=]+)"\)\)\)'
|
||||
return re.sub(pattern, lambda match: match[1] + " = " + repr(
|
||||
zlib.decompress(base64.b64decode(match[2]))), value)
|
||||
|
||||
|
||||
if "--check" in sys.argv:
|
||||
if not output.exists() or output.read_text(encoding="utf-8") != packed:
|
||||
if not output.exists() or comparable_resources(output.read_text(encoding="utf-8")) != comparable_resources(packed):
|
||||
sys.exit("Packed generator is stale; run python3 scripts/pack_pipeline.py")
|
||||
else:
|
||||
output.write_text(packed, encoding="utf-8", newline="\n")
|
||||
@@ -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):
|
||||
|
||||
@@ -22,7 +22,9 @@ printf '%s\n' '$nrconf{restart} = "l";' | sudo tee /etc/needrestart/conf.d/99-qq
|
||||
|
||||
# Retry transient repository downloads within APT, including NodeSource's child process.
|
||||
# Exhausted downloads retain APT's nonzero exit status and fail this build step.
|
||||
printf '%s\n' 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
printf '%s\n' 'Acquire::Retries "3";' 'Acquire::http::Timeout "30";' \
|
||||
'Acquire::https::Timeout "30";' 'APT::Update::Error-Mode "any";' \
|
||||
| sudo tee /etc/apt/apt.conf.d/80-qqq-download-retries >/dev/null
|
||||
|
||||
# Ubuntu archive carries the same signed security suite; avoid the flaky HTTP mirror.
|
||||
if [[ -f /etc/apt/sources.list ]]; then
|
||||
|
||||
@@ -16,16 +16,16 @@ import yaml
|
||||
# Generated by scripts/pack_pipeline.py; edit source/resources, then regenerate.
|
||||
import base64
|
||||
import zlib
|
||||
CORE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtPdl22ziy7/0VuOrM2M6YpPclifvcxHbfeCaL4zgzPSfK1YFIUGKbWwjKjk/i+fapAkCKokiKlGV5idMvMgkUCrVXocD+/gshrXMWcSfwW8/Imr66jE9CGlGPxfAcHn6HJ/DMC/xe0Ok6vtWxHNrzAx475vA9jIgvQwZ/t7pB4DLqt5aTFxaz6cCN4Z1NXc7E4yv5tuWzb3GHmiYLY+qbrNMd+JbLOoPILQLN48jxe0WQW606YHmfrm1uzRRyxEzmhPG1QP+iwLeCqJsh+devXzV4ggPPAAKPguDMUA//d0Xf0ndb6Uwz8DzqW5nZPKZRrAm2acg2LY6oybII8piFOOGzeoBg+sw8CwZxii1Jh4v30cDPQFAPfRAWRPI4YiA5jAQXPrPIW1yZ8MA8YzHJiszy6GyFOQJwbMIHVkBoGGs9mDUILRozon39Sv7619FXjg/7c12iXYrXXGwORrV9gKlAEu2c+Jz5IMiE8xREOhUGeGR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quLUo3cb9W4JXfjPVm5PrKXKjnvMB5ONcq7aW4XUZlpcM15O1DGJi/dxjgMe9yL28cObPP38oANcDQdxJ3Y8hgyGRddXvGapVSq2aAr2niLine truncated
|
||||
CORE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtPWlX20i23/tX1HNnBsggiX1JQs5j6xdmkkCIM9Nz4jwfWSrZCtqQZAiHML997q1FlmVJlowxS0h/MVItt+6+lfr6N0IaFzSMbN9rvCIr6vIiPgn0UHdpDM/h4TU8gWeu73X9dsf2zLZp613Pj2LbGLyHEfFVQOHvRsf3Hap7jUX5wqSW3ndieGfpTkTZ4xv+tuHRH3FbNwwaxLpn0Han75kObfdDJ2/pKA5tr5u3cqNRZdmop6+sb0x15ZAa1A7iWy39m1i+4YedFMrPz88VeIIDz2CFKPT9M008/N8ldUPdbiQzDd91dc9MzY5iPYwVRjYFyabEoW7QNIBRTAOc8FU8wGV61Djz+3ECLUmGs/dh30utIB56wCwI5ElIgXMo8S89apIPuDOJfOOMxiTNMovDswXkuIBtkahv+kQPYqULs/qBqceUKOfn5K9/HX5le3A+xyHKFXsdscPBqJYHa4oliXJBvIh6wMgkipIlkqkwwCWb6+tEi92AITaFrRTEclk2W+ykUMJ+7OBgovjj1tCCkFqO3e3FquN3YW6fviZxj3q4cgAMEltkjv4I/DAmnz59an84/vh/x+3m6e7+Yfv0y8edv5y3Wt4caTVe7B+d7r8/bP/r+PQff7w//lf778d77aODVoO8fYuv93Y/v2sffvxnq9HyKEgbrk+Nnk/mOEEQamAmksBD+p5+oduO3nEAJMP3YtvrAxFDu2t7ukM+6BfUI4wxInWu5Vl2y2ukSHiT/L6ZhGmOOxENL2A/z7kChNgR+e535iIC8FDHSfjIsn/E/ZCOcE9HN866od9nDIRYLeaumEYxUTxE0nUOil8pN4DEnz8J/WHHZKnlMXIrCiCKQahQ72KHI3//aDGfCos565LgKu753ipRDTs0HGrYGuOcFKOowVUhTsWvb0NKKIr9oKZoV6fIH7ZnR72aUnwJ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TN6TUnTTLTPt9NZZjNZNaNvt9CDvgTWXHUX9Kad50VBUAV0ClpIcGccFK9NcZ225QhEhCSMFZBxUbESwHaE9CEkxw/3rOyV/uwcVvnd9fswKSTKpKEA92+efgRN3oexIwfpAi+IhQyHyEmjye/A3nP5SMa57cof9LebVW693HIxexsTg+avg1kojfXLc6wUxaXmHrmvbvgLWNtQgmaE4h5bW8X6quUNmctfRdREPykCLqM=")))
|
||||
VOYAGE_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNrtW+t32jgW/56/QofT3dlHZAPNo8Oe9DRJs012pkk2SbvdUzI+whagYEuOJBNoyvzte+UXDxsCaZnNdPqBgy1d6V79dF+6gvsNhCp9KhUTvNJAdau2aVpuREvB6z08w1srYr6HCfewpkrn7dATELfLOJ1ogkYWkI5pqkStiOsI1+vVrYYbSUm5rqRko81sCkmViKRLHdcnyjCt+ETC+JyA8j6Tggdm9BSft/vvj06ds/OrSzMKfwgGwOhFUGShNA3NzB/HY90udXsi0jkbNDEz9N/e3mIhWzbjShPfd25In0xxj6lMqzNGr1KvVSYIRvnzaMwlnznoc8cF+KgDCGgh6TxRZMSLnDkJYojfU8naQ0TC0Gcu0SDHJmJc046MX5DZMLWJbiPiMw103EOuAIlJZ5JfAokIAug3s4JsyPUp4aifzI8PEL7aQhhHoUc0xYqTUHWFVtDEBdaScNWmEodSdGA56jEwKNKfi0EMkGMWY9CKfK2KkIREd43w2qiPtlUkaZtJiiUNhdQPi/SlDNuE+Yq0v4ghkZq1ibsEt74Ywh5aN0TO7qMHQjMeb7+hB9WIqdYqjWKaPiBHqoKxG8lVcK1CxTau9NA3W2L20BoE/iOknDPRegENhW5FHfUh8B8r9ewUa5U3DLzHypkNXUm+0DhdME4tnDsheyokLi0KKYUwMaNizcplpJ+OCGlHpjomFlE1M2zcbxwDfoio4IHmEc61ZbTIwMadN8QVrrDogLpFmtfC7VHZZn7J+FAEJbtmtl+WzGS5grdZpzLVfl2+bRuTvekmVhR1JdUKK5dMhrS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2EY3k1CjpQKYNqnvsayKBJhEyrHJu4PioH2qWLNkM+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+Znb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TTz/Zp83uOLn95Mn3ybQ9y94r/1nnT3faZ+xI4LidpqJNtx5vEMcL/fMjsLHeSVLEAMMszFigQ9R2qZKD8d/QoALm5ENn0HAVrubD5YsTliVTsISzf09SHaH/j2tSs9HdvSevb/th5G/vnRhptMDqKb5zhH3Ud+6w4a76sYyoGEoIQWv7Nm/Hihfjq5rxwL715e74t/dn9s/8DqAZZ8g==")))
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -167,9 +167,16 @@
|
||||
"command": "python3 - \\<<'PY'\nfrom pathlib import Path\nfrom xml.etree import ElementTree\n\nreports = Path(\"qqq-esb/target/failsafe-reports\")\nfor broker in (\"Artemis\", \"RabbitMQ\"):\n path = reports / f\"TEST-com.kingsrook.qqq.esb.conformance.{broker}ConformanceIT.xml\"\n suite = ElementTree.parse(path).getroot()\n matches = [case for case in suite.findall(\"testcase\") if case.get(\"name\") == \"reconnectsAfterBrokerRestart\"]\n assert len(matches) == 1, f\"{broker}: broker restart test missing\"\n assert matches[0].find(\"skipped\") is None, f\"{broker}: broker restart test was skipped\"\nPY\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Stage broker JUnit reports",
|
||||
"when": "always",
|
||||
"command": "python3 - \\<<'PY'\nfrom pathlib import Path\nfrom shutil import copy2\n\nsource = Path(\"qqq-esb/target/failsafe-reports\")\ndestination = Path(\"qqq-esb/target/circleci-junit\")\ndestination.mkdir(parents=True, exist_ok=True)\nfor report in source.glob(\"TEST-*.xml\"):\n copy2(report, destination / report.name)\nPY\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_test_results": {
|
||||
"path": "qqq-esb/target/failsafe-reports"
|
||||
"path": "qqq-esb/target/circleci-junit"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -341,9 +348,9 @@
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Require source-generated starter and application acceptance with live PostgreSQL",
|
||||
"name": "Require source-generated starter and application acceptance with live MySQL",
|
||||
"no_output_timeout": "30m",
|
||||
"command": "set -euo pipefail\nconsumer_root=$(mktemp -d /tmp/qqq-starter-acceptance-XXXXXX)\ntrap 'rm -rf \"$consumer_root\"' EXIT\ngit clone https://github.com/QRun-IO/qqq-app-starter.git \"$consumer_root/starter\"\ngit -C \"$consumer_root/starter\" checkout --detach 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ntest \"$(git -C \"$consumer_root/starter\" rev-parse HEAD)\" = 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ngit clone https://github.com/QRun-IO/qbit-template-application.git \"$consumer_root/template\"\ngit -C \"$consumer_root/template\" fetch origin refs/pull/5/head\ngit -C \"$consumer_root/template\" checkout --detach FETCH_HEAD\ntest \"$(git -C \"$consumer_root/template\" rev-parse HEAD)\" = 70a72a54f4a3024e39d07a7d86c5acf738283286\ndocker pull postgres:17-alpine\nQQQ_STARTER_SOURCE=\"$consumer_root/starter\" QQQ_TEMPLATE_SOURCE=\"$consumer_root/template\" \\\n python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v\npython3 qqq-sample-project/acceptance/run_starter_application.py \\\n --qqq-source . --starter-source \"$consumer_root/starter\" \\\n --template-source \"$consumer_root/template\" \\\n --candidate-version 0.0.0-sample-acceptance \\\n --maven-repo \"$consumer_root/m2\" --online \\\n --maven-settings /tmp/circleci/mvn-settings.xml --live-postgres \\\n --junit-dir qqq-sample-project/target/starter-application-junit\npython3 qqq-sample-project/verify-feature-coverage.py --stage source \\\n --require-feature train.starter --require-feature train.application\n"
|
||||
"command": "set -euo pipefail\nconsumer_root=$(mktemp -d /tmp/qqq-starter-acceptance-XXXXXX)\ntrap 'rm -rf \"$consumer_root\"' EXIT\ngit clone https://github.com/QRun-IO/qqq-app-starter.git \"$consumer_root/starter\"\ngit -C \"$consumer_root/starter\" checkout --detach 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ntest \"$(git -C \"$consumer_root/starter\" rev-parse HEAD)\" = 2fb62378fa76da1950dc9e67984c18fd0491ae3f\ngit clone https://github.com/QRun-IO/qbit-template-application.git \"$consumer_root/template\"\ngit -C \"$consumer_root/template\" fetch origin refs/pull/5/head\ngit -C \"$consumer_root/template\" checkout --detach FETCH_HEAD\ntest \"$(git -C \"$consumer_root/template\" rev-parse HEAD)\" = 70a72a54f4a3024e39d07a7d86c5acf738283286\ndocker pull mysql:8.4\nQQQ_STARTER_SOURCE=\"$consumer_root/starter\" QQQ_TEMPLATE_SOURCE=\"$consumer_root/template\" \\\n python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v\npython3 qqq-sample-project/acceptance/run_starter_application.py \\\n --qqq-source . --starter-source \"$consumer_root/starter\" \\\n --template-source \"$consumer_root/template\" \\\n --candidate-version 0.0.0-sample-acceptance \\\n --maven-repo \"$consumer_root/m2\" --online \\\n --maven-settings /tmp/circleci/mvn-settings.xml --live-mysql \\\n --junit-dir qqq-sample-project/target/starter-application-junit\npython3 qqq-sample-project/verify-feature-coverage.py --stage source \\\n --require-feature train.starter --require-feature train.application\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
+574
-532
File diff suppressed because it is too large.
Load diff
+18
-4
@@ -152,8 +152,22 @@ jobs:
|
||||
assert len(matches) == 1, f"{broker}: broker restart test missing"
|
||||
assert matches[0].find("skipped") is None, f"{broker}: broker restart test was skipped"
|
||||
PY
|
||||
- run:
|
||||
name: Stage broker JUnit reports
|
||||
when: always
|
||||
command: |
|
||||
python3 - \<<'PY'
|
||||
from pathlib import Path
|
||||
from shutil import copy2
|
||||
|
||||
source = Path("qqq-esb/target/failsafe-reports")
|
||||
destination = Path("qqq-esb/target/circleci-junit")
|
||||
destination.mkdir(parents=True, exist_ok=True)
|
||||
for report in source.glob("TEST-*.xml"):
|
||||
copy2(report, destination / report.name)
|
||||
PY
|
||||
- store_test_results:
|
||||
path: qqq-esb/target/failsafe-reports
|
||||
path: qqq-esb/target/circleci-junit
|
||||
|
||||
sample_bootstrap_source:
|
||||
executor: qqq-orb/java
|
||||
@@ -313,7 +327,7 @@ jobs:
|
||||
name: Build framework dependencies for the consumers
|
||||
command: mvn -B -s /tmp/circleci/mvn-settings.xml -Drevision=0.0.0-sample-acceptance -DskipTests clean install
|
||||
- run:
|
||||
name: Require source-generated starter and application acceptance with live PostgreSQL
|
||||
name: Require source-generated starter and application acceptance with live MySQL
|
||||
no_output_timeout: 30m
|
||||
command: |
|
||||
set -euo pipefail
|
||||
@@ -326,7 +340,7 @@ jobs:
|
||||
git -C "$consumer_root/template" fetch origin refs/pull/5/head
|
||||
git -C "$consumer_root/template" checkout --detach FETCH_HEAD
|
||||
test "$(git -C "$consumer_root/template" rev-parse HEAD)" = 70a72a54f4a3024e39d07a7d86c5acf738283286
|
||||
docker pull postgres:17-alpine
|
||||
docker pull mysql:8.4
|
||||
QQQ_STARTER_SOURCE="$consumer_root/starter" QQQ_TEMPLATE_SOURCE="$consumer_root/template" \
|
||||
python3 -m unittest discover -s qqq-sample-project/acceptance -p test_starter_application.py -v
|
||||
python3 qqq-sample-project/acceptance/run_starter_application.py \
|
||||
@@ -334,7 +348,7 @@ jobs:
|
||||
--template-source "$consumer_root/template" \
|
||||
--candidate-version 0.0.0-sample-acceptance \
|
||||
--maven-repo "$consumer_root/m2" --online \
|
||||
--maven-settings /tmp/circleci/mvn-settings.xml --live-postgres \
|
||||
--maven-settings /tmp/circleci/mvn-settings.xml --live-mysql \
|
||||
--junit-dir qqq-sample-project/target/starter-application-junit
|
||||
python3 qqq-sample-project/verify-feature-coverage.py --stage source \
|
||||
--require-feature train.starter --require-feature train.application
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Exercise actual APT downloads against a local fault-injecting HTTP mirror.
|
||||
|
||||
Run in a disposable Debian/Ubuntu container with Python and apt-helper installed.
|
||||
No external network, package installation, or signature bypass is required.
|
||||
"""
|
||||
import hashlib
|
||||
import http.server
|
||||
from pathlib import Path
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
PAYLOAD = b"qqq package download fixture\n"
|
||||
POLICY = (
|
||||
'Acquire::Retries "3";',
|
||||
'Acquire::http::Timeout "30";',
|
||||
'Acquire::https::Timeout "30";',
|
||||
'APT::Update::Error-Mode "any";',
|
||||
)
|
||||
|
||||
|
||||
class AptFetchPolicyTests(unittest.TestCase):
|
||||
def test_runner_mirror_selection(self):
|
||||
# Execute the actual workflow command against the hosted runner's mirror format.
|
||||
original = ("http://azure.archive.ubuntu.com/ubuntu/\tpriority:1\n"
|
||||
"https://archive.ubuntu.com/ubuntu/\tpriority:2\n"
|
||||
"https://security.ubuntu.com/ubuntu/\tpriority:3\n")
|
||||
expected = original.split("\n", 1)[1]
|
||||
for name in ("next-ci.yml", "next-acceptance.yml"):
|
||||
workflow = (ROOT / ".github/workflows" / name).read_text()
|
||||
commands = [line.strip() for line in workflow.splitlines()
|
||||
if line.strip().startswith("sudo sed -i ")]
|
||||
self.assertEqual(len(commands), 2)
|
||||
for command in commands:
|
||||
with tempfile.TemporaryDirectory() as scratch:
|
||||
mirrors = Path(scratch) / "apt-mirrors.txt"
|
||||
mirrors.write_text(original)
|
||||
command = command.removeprefix("sudo ").replace(
|
||||
"/etc/apt/apt-mirrors.txt", str(mirrors))
|
||||
for _ in range(2):
|
||||
subprocess.run(["bash", "-e", "-c", command], check=True)
|
||||
self.assertEqual(mirrors.read_text(), expected)
|
||||
|
||||
def test_real_download_failures(self):
|
||||
source = (ROOT / "src/scripts/install_java.sh").read_text()
|
||||
stanza = source.split("# Retry transient repository downloads", 1)[1].split("# Ubuntu archive", 1)[0]
|
||||
options = re.findall(r"'([^']+;)'", stanza)
|
||||
self.assertEqual(tuple(options), POLICY)
|
||||
for name in ("next-ci.yml", "next-acceptance.yml"):
|
||||
workflow = (ROOT / ".github/workflows" / name).read_text()
|
||||
blocks = workflow.split(" - name: Install browser system dependencies\n")[1:]
|
||||
self.assertEqual(len(blocks), 2)
|
||||
for block in blocks:
|
||||
block = block.split(" - ", 1)[0]
|
||||
self.assertIn("timeout-minutes: 10", block)
|
||||
self.assertEqual(tuple(re.findall(r"'([^']+;)'", block)), POLICY)
|
||||
|
||||
requests = {}
|
||||
|
||||
class Mirror(http.server.BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
requests[self.path] = requests.get(self.path, 0) + 1
|
||||
status = 200
|
||||
if self.path == "/permanent" or (self.path == "/transient" and requests[self.path] <= 2):
|
||||
status = 503
|
||||
elif self.path == "/missing":
|
||||
status = 404
|
||||
self.send_response(status)
|
||||
self.send_header("Content-Length", str(len(PAYLOAD)))
|
||||
self.end_headers()
|
||||
self.wfile.write(PAYLOAD)
|
||||
|
||||
def log_message(self, *_args):
|
||||
pass
|
||||
|
||||
server = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Mirror)
|
||||
thread = threading.Thread(target=server.serve_forever, daemon=True)
|
||||
thread.start()
|
||||
try:
|
||||
with tempfile.TemporaryDirectory() as scratch:
|
||||
config = Path(scratch) / "apt.conf"
|
||||
config.write_text("\n".join(options) + "\n")
|
||||
for case, expected, count in (("normal", 0, 1), ("transient", 0, 3),
|
||||
("permanent", 100, 4), ("missing", 100, 1),
|
||||
("bad-hash", 100, 1)):
|
||||
with self.subTest(case=case):
|
||||
digest = hashlib.sha256(PAYLOAD if case != "bad-hash" else b"different").hexdigest()
|
||||
url = f"http://127.0.0.1:{server.server_port}/{case}"
|
||||
started = time.monotonic()
|
||||
result = subprocess.run([
|
||||
"/usr/lib/apt/apt-helper", "-c", str(config), "download-file", url,
|
||||
str(Path(scratch) / case), "SHA256:" + digest,
|
||||
], capture_output=True, text=True, timeout=25)
|
||||
output = result.stdout + result.stderr
|
||||
self.assertEqual(result.returncode, expected, output)
|
||||
self.assertEqual(requests["/" + case], count, output)
|
||||
self.assertLess(time.monotonic() - started, 25)
|
||||
if expected == 0:
|
||||
self.assertEqual((Path(scratch) / case).read_bytes(), PAYLOAD)
|
||||
else:
|
||||
self.assertIn("127.0.0.1", output)
|
||||
if case == "permanent":
|
||||
self.assertIn("503", output)
|
||||
if case == "bad-hash":
|
||||
self.assertIn("Hash Sum mismatch", output)
|
||||
finally:
|
||||
server.shutdown()
|
||||
server.server_close()
|
||||
thread.join(timeout=5)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
@@ -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()
|
||||
@@ -0,0 +1,79 @@
|
||||
"""Execute the generated CI staging command against representative Maven output."""
|
||||
import base64
|
||||
import importlib.util
|
||||
import re
|
||||
import shutil
|
||||
import zlib
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
spec = importlib.util.spec_from_file_location("pipeline", ROOT / "src/scripts/generate_pipeline.py")
|
||||
pipeline = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(pipeline)
|
||||
|
||||
|
||||
class EsbJunitStagingTests(unittest.TestCase):
|
||||
def test_only_junit_suites_are_uploaded_without_changing_source_evidence(self):
|
||||
rendered = pipeline.core_template({"orb_version": "0.7.12", "docs_only": False, "java_version": "21", "browsers": True, "api_checks": False}, "feature/report-test", "")
|
||||
steps = rendered["jobs"]["esb_broker_conformance"]["steps"]
|
||||
stage = next(step["run"] for step in steps if isinstance(step, dict)
|
||||
and step.get("run", {}).get("name") == "Stage broker JUnit reports")
|
||||
upload = next(step["store_test_results"] for step in steps
|
||||
if isinstance(step, dict) and "store_test_results" in step)
|
||||
self.assertEqual(stage["when"], "always")
|
||||
script = "\n".join(stage["command"].splitlines()[1:-1])
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
source = root / "qqq-esb/target/failsafe-reports"
|
||||
source.mkdir(parents=True)
|
||||
reports = {
|
||||
"TEST-ArtemisConformanceIT.xml": "<testsuite tests='1'/>",
|
||||
"TEST-RabbitMQConformanceIT.xml": "<testsuite tests='2'/>",
|
||||
"TEST-PublishingPoolIT.xml": "<testsuite tests='3'/>",
|
||||
"failsafe-summary.xml": "<failsafe-summary/>",
|
||||
"broker.dumpstream": "diagnostic",
|
||||
}
|
||||
for name, content in reports.items():
|
||||
(source / name).write_text(content, encoding="utf-8")
|
||||
subprocess.run([sys.executable, "-c", script], cwd=root, check=True)
|
||||
destination = root / upload["path"]
|
||||
self.assertEqual({p.name for p in destination.iterdir()},
|
||||
{name for name in reports if name.startswith("TEST-")})
|
||||
for name, content in reports.items():
|
||||
self.assertEqual((source / name).read_text(encoding="utf-8"), content)
|
||||
if name.startswith("TEST-"):
|
||||
self.assertEqual((destination / name).read_text(encoding="utf-8"), content)
|
||||
|
||||
|
||||
class PackedResourcePortabilityTests(unittest.TestCase):
|
||||
def test_compression_variants_pass_but_changed_resource_or_code_fails(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
(root / "scripts").mkdir()
|
||||
shutil.copyfile(ROOT / "scripts/pack_pipeline.py", root / "scripts/pack_pipeline.py")
|
||||
shutil.copytree(ROOT / "src/scripts", root / "src/scripts")
|
||||
command = [sys.executable, "scripts/pack_pipeline.py"]
|
||||
subprocess.run(command, cwd=root, check=True)
|
||||
output = root / "src/scripts/packed_generate_pipeline.py"
|
||||
packed = output.read_text(encoding="utf-8")
|
||||
pattern = r'base64\.b64decode\("([A-Za-z0-9+/=]+)"\)'
|
||||
variant = re.sub(pattern, lambda match: 'base64.b64decode("' + base64.b64encode(
|
||||
zlib.compress(zlib.decompress(base64.b64decode(match[1])), level=0)).decode("ascii") + '")', packed)
|
||||
self.assertNotEqual(variant, packed)
|
||||
output.write_text(variant, encoding="utf-8")
|
||||
subprocess.run(command + ["--check"], cwd=root, check=True)
|
||||
|
||||
template = root / "src/scripts/templates/core.json"
|
||||
template.write_text(template.read_text(encoding="utf-8") + " ", encoding="utf-8")
|
||||
self.assertNotEqual(subprocess.run(command + ["--check"], cwd=root, capture_output=True).returncode, 0)
|
||||
template.write_text(template.read_text(encoding="utf-8")[:-1], encoding="utf-8")
|
||||
output.write_text(variant + "\n# stale code\n", encoding="utf-8")
|
||||
self.assertNotEqual(subprocess.run(command + ["--check"], cwd=root, capture_output=True).returncode, 0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
+865
-890
File diff suppressed because it is too large.
Load diff
@@ -43,6 +43,15 @@ class NextNativeTests(unittest.TestCase):
|
||||
("dashboard-image.yml", "next-dashboard-image.yml")):
|
||||
before = yaml.safe_load((ROOT / "tests/fixtures" / ("next-" + source)).read_text(encoding="utf-8"))
|
||||
after = yaml.safe_load((ROOT / ".github/workflows" / worker).read_text(encoding="utf-8"))
|
||||
# The package-fetch policy adds bounded setup only; retain exact test gates.
|
||||
for job in after["jobs"].values():
|
||||
for step in job.get("steps", []):
|
||||
if step.get("name") == "Install browser system dependencies":
|
||||
self.assertEqual(step["timeout-minutes"], 10)
|
||||
command = step["run"].strip().splitlines()[-1]
|
||||
self.assertTrue(command.startswith("pnpm exec playwright install-deps "))
|
||||
step.clear()
|
||||
step["run"] = command
|
||||
self.assertEqual(before["jobs"], after["jobs"], worker)
|
||||
self.assertEqual(before.get("env"), after.get("env"), worker)
|
||||
self.assertEqual(before.get("permissions"), after.get("permissions"), worker)
|
||||
|
||||
+131
-137
@@ -1,137 +1,131 @@
|
||||
"""Voyage's authoritative CI contracts, extracted from source 9f598cc105ef."""
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
import re
|
||||
import unittest
|
||||
|
||||
TEMPLATE = json.loads((Path(__file__).resolve().parents[1] / "src/scripts/templates/voyage.json").read_text())
|
||||
|
||||
|
||||
def matches(pattern, branch):
|
||||
if isinstance(pattern, list):
|
||||
return any(matches(p, branch) for p in pattern)
|
||||
if pattern.startswith("/") and pattern.endswith("/"):
|
||||
return re.fullmatch(pattern[1:-1], branch) is not None
|
||||
return pattern == branch
|
||||
|
||||
|
||||
def selected(branch):
|
||||
found = []
|
||||
for workflow, body in TEMPLATE["workflows"].items():
|
||||
for invocation in body["jobs"]:
|
||||
name, options = next(iter(invocation.items()))
|
||||
filters = options.get("filters", {}).get("branches", {})
|
||||
if "only" in filters and not matches(filters["only"], branch):
|
||||
continue
|
||||
if "ignore" in filters and matches(filters["ignore"], branch):
|
||||
continue
|
||||
found.append((workflow, options.get("name", name), options))
|
||||
return found
|
||||
|
||||
|
||||
class VoyageContract(unittest.TestCase):
|
||||
def test_each_supported_branch_has_one_validation_owner(self):
|
||||
for branch, workflow in (("feature/example", "pull-request"), ("hotfix/example", "pull-request"), ("develop", "develop"), ("main", "release"), ("release/1.0", "release")):
|
||||
with self.subTest(branch=branch):
|
||||
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"})
|
||||
|
||||
def test_verify_owns_tests_quality_and_coverage_without_skips(self):
|
||||
jobs = TEMPLATE["jobs"]
|
||||
self.assertNotIn("coverage", jobs)
|
||||
self.assertNotIn("code-quality", jobs)
|
||||
steps = jobs["build-and-test"]["steps"]
|
||||
commands = [s["run"]["command"] for s in steps if isinstance(s, dict) and "run" in s]
|
||||
self.assertEqual(commands, ["mvn clean verify -B -T4 --update-snapshots --no-transfer-progress"])
|
||||
full = json.dumps(jobs)
|
||||
self.assertNotIn("mvn test", full)
|
||||
self.assertNotIn("jacoco.skip", full)
|
||||
self.assertNotIn("skipTests", full)
|
||||
self.assertLess(steps.index("qqq-orb/mvn_cache_restore"), steps.index("qqq-orb/mvn_cache_save"))
|
||||
|
||||
def test_unit_integration_and_coverage_evidence_retained(self):
|
||||
steps = TEMPLATE["jobs"]["build-and-test"]["steps"]
|
||||
results = [s["store_test_results"]["path"] for s in steps if isinstance(s, dict) and "store_test_results" in s]
|
||||
self.assertEqual(results, ["target/surefire-reports", "target/failsafe-reports"])
|
||||
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))
|
||||
|
||||
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"]}
|
||||
for entry in body["jobs"]:
|
||||
name, options = next(iter(entry.items()))
|
||||
self.assertTrue(name in TEMPLATE["jobs"] or name == "munitor/update_cd_repo")
|
||||
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)])
|
||||
self.assertNotIn("release-please", [n for _, n, _ in selected(branch)])
|
||||
main = {n: o for _, n, o in selected("main")}
|
||||
self.assertEqual(main["update-cd-repo"]["requires"], ["docker-build"])
|
||||
self.assertEqual(main["release-please"]["requires"], ["docker-build"])
|
||||
self.assertEqual(main["docker-build"]["requires"], ["build-and-test", "secrets-scan", "sast-scan", "security-scan"])
|
||||
|
||||
def test_dependency_scan_propagates_findings_and_operational_errors(self):
|
||||
command = next(s["run"]["command"] for s in TEMPLATE["jobs"]["security-scan"]["steps"]
|
||||
if isinstance(s, dict) and "run" in s)
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
(root / "bin").mkdir()
|
||||
docker = root / "bin/docker"
|
||||
docker.write_text('#!/bin/sh\nexit "$SCANNER_RESULT"\n')
|
||||
docker.chmod(0o755)
|
||||
(root / "target").mkdir()
|
||||
(root / "target/voyage.jar").write_bytes(b"artifact")
|
||||
env = {**os.environ, "HOME": directory, "PATH": str(root / "bin") + os.pathsep + os.environ["PATH"],
|
||||
"CIRCLE_BRANCH": "develop"}
|
||||
for code in (0, 1, 2):
|
||||
result = subprocess.run(["bash", "-c", command], cwd=root,
|
||||
env={**env, "SCANNER_RESULT": str(code)}, capture_output=True)
|
||||
self.assertEqual(result.returncode, code)
|
||||
(root / "target/voyage.jar").unlink()
|
||||
result = subprocess.run(["bash", "-c", command], cwd=root,
|
||||
env={**env, "SCANNER_RESULT": "0"}, capture_output=True)
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
|
||||
def test_security_policies_and_destinations_preserved(self):
|
||||
jobs = TEMPLATE["jobs"]
|
||||
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)
|
||||
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)
|
||||
self.assertIn('aquasec/trivy:0.76.0@sha256:', owasp)
|
||||
self.assertNotIn('--ignore-unfixed', owasp)
|
||||
self.assertNotIn('NVD_API_KEY', owasp)
|
||||
self.assertNotIn('mvn ', owasp)
|
||||
self.assertIn('set -euo pipefail', owasp)
|
||||
self.assertEqual(jobs["security-scan"]["resource_class"], "medium")
|
||||
for workflow in TEMPLATE["workflows"].values():
|
||||
for invocation in workflow["jobs"]:
|
||||
if "security-scan" in invocation:
|
||||
self.assertNotIn("context", invocation["security-scan"])
|
||||
self.assertIn('./gitleaks detect', json.dumps(jobs["secrets-scan"]))
|
||||
self.assertIn('|| true', json.dumps(jobs["sast-scan"]))
|
||||
self.assertIn('makeAggregateBom', json.dumps(jobs["sbom"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
"""Voyage's authoritative CI contracts, extracted from source 9f598cc105ef."""
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
import re
|
||||
import unittest
|
||||
|
||||
TEMPLATE = json.loads((Path(__file__).resolve().parents[1] / "src/scripts/templates/voyage.json").read_text())
|
||||
|
||||
|
||||
def matches(pattern, branch):
|
||||
if isinstance(pattern, list):
|
||||
return any(matches(p, branch) for p in pattern)
|
||||
if pattern.startswith("/") and pattern.endswith("/"):
|
||||
return re.fullmatch(pattern[1:-1], branch) is not None
|
||||
return pattern == branch
|
||||
|
||||
|
||||
def selected(branch):
|
||||
found = []
|
||||
for workflow, body in TEMPLATE["workflows"].items():
|
||||
for invocation in body["jobs"]:
|
||||
name, options = next(iter(invocation.items()))
|
||||
filters = options.get("filters", {}).get("branches", {})
|
||||
if "only" in filters and not matches(filters["only"], branch):
|
||||
continue
|
||||
if "ignore" in filters and matches(filters["ignore"], branch):
|
||||
continue
|
||||
found.append((workflow, options.get("name", name), options))
|
||||
return found
|
||||
|
||||
|
||||
class VoyageContract(unittest.TestCase):
|
||||
def test_each_supported_branch_has_one_validation_owner(self):
|
||||
for branch, workflow in (("feature/example", "pull-request"), ("hotfix/example", "pull-request"), ("develop", "develop"), ("main", "release"), ("release/1.0", "release")):
|
||||
with self.subTest(branch=branch):
|
||||
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"})
|
||||
|
||||
def test_verify_owns_tests_quality_and_coverage_without_skips(self):
|
||||
jobs = TEMPLATE["jobs"]
|
||||
self.assertNotIn("coverage", jobs)
|
||||
self.assertNotIn("code-quality", jobs)
|
||||
steps = jobs["build-and-test"]["steps"]
|
||||
commands = [s["run"]["command"] for s in steps if isinstance(s, dict) and "run" in s]
|
||||
self.assertEqual(commands, ["mvn clean verify -B -T4 --update-snapshots --no-transfer-progress"])
|
||||
full = json.dumps(jobs)
|
||||
self.assertNotIn("mvn test", full)
|
||||
self.assertNotIn("jacoco.skip", full)
|
||||
self.assertNotIn("skipTests", full)
|
||||
self.assertLess(steps.index("qqq-orb/mvn_cache_restore"), steps.index("qqq-orb/mvn_cache_save"))
|
||||
|
||||
def test_unit_integration_and_coverage_evidence_retained(self):
|
||||
steps = TEMPLATE["jobs"]["build-and-test"]["steps"]
|
||||
results = [s["store_test_results"]["path"] for s in steps if isinstance(s, dict) and "store_test_results" in s]
|
||||
self.assertEqual(results, ["target/surefire-reports", "target/failsafe-reports"])
|
||||
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)
|
||||
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"]}
|
||||
for entry in body["jobs"]:
|
||||
name, options = next(iter(entry.items()))
|
||||
self.assertTrue(name in TEMPLATE["jobs"] or name == "munitor/update_cd_repo")
|
||||
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)])
|
||||
self.assertNotIn("release-please", [n for _, n, _ in selected(branch)])
|
||||
main = {n: o for _, n, o in selected("main")}
|
||||
self.assertEqual(main["update-cd-repo"]["requires"], ["docker-build"])
|
||||
self.assertEqual(main["release-please"]["requires"], ["docker-build"])
|
||||
self.assertEqual(main["docker-build"]["requires"], ["build-and-test", "secrets-scan", "sast-scan", "security-scan"])
|
||||
|
||||
def test_dependency_scan_propagates_findings_and_operational_errors(self):
|
||||
command = next(s["run"]["command"] for s in TEMPLATE["jobs"]["security-scan"]["steps"]
|
||||
if isinstance(s, dict) and "run" in s)
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
(root / "bin").mkdir()
|
||||
docker = root / "bin/docker"
|
||||
docker.write_text('#!/bin/sh\nexit "$SCANNER_RESULT"\n')
|
||||
docker.chmod(0o755)
|
||||
(root / "target").mkdir()
|
||||
(root / "target/voyage.jar").write_bytes(b"artifact")
|
||||
env = {**os.environ, "HOME": directory, "PATH": str(root / "bin") + os.pathsep + os.environ["PATH"],
|
||||
"CIRCLE_BRANCH": "develop"}
|
||||
for code in (0, 1, 2):
|
||||
result = subprocess.run(["bash", "-c", command], cwd=root,
|
||||
env={**env, "SCANNER_RESULT": str(code)}, capture_output=True)
|
||||
self.assertEqual(result.returncode, code)
|
||||
(root / "target/voyage.jar").unlink()
|
||||
result = subprocess.run(["bash", "-c", command], cwd=root,
|
||||
env={**env, "SCANNER_RESULT": "0"}, capture_output=True)
|
||||
self.assertNotEqual(result.returncode, 0)
|
||||
|
||||
def test_security_policies_and_destinations_preserved(self):
|
||||
jobs = TEMPLATE["jobs"]
|
||||
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)
|
||||
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)
|
||||
self.assertIn('aquasec/trivy:0.76.0@sha256:', owasp)
|
||||
self.assertNotIn('--ignore-unfixed', owasp)
|
||||
self.assertNotIn('NVD_API_KEY', owasp)
|
||||
self.assertNotIn('mvn ', owasp)
|
||||
self.assertIn('set -euo pipefail', owasp)
|
||||
self.assertEqual(jobs["security-scan"]["resource_class"], "medium")
|
||||
for workflow in TEMPLATE["workflows"].values():
|
||||
for invocation in workflow["jobs"]:
|
||||
if "security-scan" in invocation:
|
||||
self.assertNotIn("context", invocation["security-scan"])
|
||||
self.assertIn('./gitleaks detect', json.dumps(jobs["secrets-scan"]))
|
||||
self.assertIn('|| true', json.dumps(jobs["sast-scan"]))
|
||||
self.assertIn('makeAggregateBom', json.dumps(jobs["sbom"]))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user