Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cce5dc635d |
No files matched your search
@@ -29,3 +29,13 @@ One small job in a digest-pinned Homebrew container validates the exact checkout
|
||||
reads all OS/architecture variants, fetches their binaries with checksum verification,
|
||||
then installs and tests the Linux formula. It does not publish or update formulae.
|
||||
macOS downloads are verified, but this Linux job does not execute macOS binaries.
|
||||
|
||||
|
||||
### Application template acceptance
|
||||
|
||||
The `application-template` profile renders the checked-out template through pinned
|
||||
qctl code and a checksum-verified catalog. It runs transforms but never post-generation
|
||||
hooks, then performs Maven verify on the generated application with all its tests.
|
||||
The renderer and Maven dependencies are cached; test reports and the generated JAR
|
||||
are retained. This is acceptance of a generated consumer, not Maven publication.
|
||||
Only the standard profile, orb version, and default branch are consumer settings.
|
||||
@@ -12,7 +12,7 @@ text = source.read_text(encoding="utf-8")
|
||||
start = text.index("# BEGIN PROFILE RESOURCES")
|
||||
end = text.index("# END PROFILE RESOURCES") + len("# END PROFILE RESOURCES")
|
||||
embedded = ["# Generated by scripts/pack_pipeline.py; edit source/resources, then regenerate.", "import base64", "import zlib"]
|
||||
for variable, name in (("CORE_TEMPLATE", "core"), ("MATERIAL_TEMPLATE", "frontend-material"), ("VOYAGE_TEMPLATE", "voyage"), ("NEXT_TEMPLATE", "frontend-next"), ("ALL_TEMPLATE", "all"), ("STARTER_TEMPLATE", "app-starter"), ("ANDROID_TEMPLATE", "android"), ("POLICY_TEMPLATE", "mcp-policy"), ("REPOSITORY_POLICY_TEMPLATE", "repository-policy"), ("MARKETING_TEMPLATE", "marketing"), ("HOMEBREW_TEMPLATE", "homebrew-tap")):
|
||||
for variable, name in (("CORE_TEMPLATE", "core"), ("MATERIAL_TEMPLATE", "frontend-material"), ("VOYAGE_TEMPLATE", "voyage"), ("NEXT_TEMPLATE", "frontend-next"), ("ALL_TEMPLATE", "all"), ("STARTER_TEMPLATE", "app-starter"), ("ANDROID_TEMPLATE", "android"), ("POLICY_TEMPLATE", "mcp-policy"), ("REPOSITORY_POLICY_TEMPLATE", "repository-policy"), ("MARKETING_TEMPLATE", "marketing"), ("HOMEBREW_TEMPLATE", "homebrew-tap"), ("APPLICATION_TEMPLATE", "application-template")):
|
||||
resource = (source.parent / "templates" / (name + ".json")).read_text(encoding="utf-8").encode("utf-8")
|
||||
payload = base64.b64encode(zlib.compress(resource, level=9)).decode("ascii")
|
||||
embedded.append(f'{variable} = json.loads(zlib.decompress(base64.b64decode("{payload}")))')
|
||||
|
||||
@@ -26,6 +26,7 @@ POLICY_TEMPLATE = json.loads((_TEMPLATE_DIR / "mcp-policy.json").read_text(encod
|
||||
REPOSITORY_POLICY_TEMPLATE = json.loads((_TEMPLATE_DIR / "repository-policy.json").read_text(encoding="utf-8"))
|
||||
MARKETING_TEMPLATE = json.loads((_TEMPLATE_DIR / "marketing.json").read_text(encoding="utf-8"))
|
||||
HOMEBREW_TEMPLATE = json.loads((_TEMPLATE_DIR / "homebrew-tap.json").read_text(encoding="utf-8"))
|
||||
APPLICATION_TEMPLATE = json.loads((_TEMPLATE_DIR / "application-template.json").read_text(encoding="utf-8"))
|
||||
# END PROFILE RESOURCES
|
||||
|
||||
|
||||
@@ -71,7 +72,7 @@ def load_manifest(path, setup_version):
|
||||
if not isinstance(data, dict):
|
||||
raise ManifestError("Manifest must be a mapping")
|
||||
profile = data.get("profile")
|
||||
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap"):
|
||||
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap", "application-template"):
|
||||
raise ManifestError("Unsupported profile")
|
||||
allowed = ("profile", "orb_version", "default_branch", "docs_only", "publish")
|
||||
if profile == "homebrew-tap":
|
||||
@@ -84,7 +85,7 @@ def load_manifest(path, setup_version):
|
||||
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
|
||||
elif profile == "cli":
|
||||
allowed += ("publish_context",)
|
||||
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing"):
|
||||
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":
|
||||
allowed = ("profile", "orb_version", "default_branch", "publish", "publish_context")
|
||||
@@ -174,7 +175,7 @@ def load_manifest(path, setup_version):
|
||||
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
|
||||
"docs_only": boolean(data, "docs_only", False),
|
||||
"publish_context": publish_context,
|
||||
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy")
|
||||
"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}}
|
||||
|
||||
@@ -516,7 +517,12 @@ def homebrew_template(config, branch, tag):
|
||||
return result
|
||||
|
||||
|
||||
PROFILE_TEMPLATES = {"homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
|
||||
def application_template(config, branch, tag):
|
||||
del config, branch, tag
|
||||
return copy.deepcopy(APPLICATION_TEMPLATE)
|
||||
|
||||
|
||||
PROFILE_TEMPLATES = {"application-template": application_template, "homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
|
||||
"repository-policy": repository_policy_template,
|
||||
"frontend-material": frontend_template, "frontend-core": frontend_template,
|
||||
"cli": cli_template, "voyage": voyage_template, "frontend-next": next_template, "all": all_template, "app-starter": starter_template, "android": android_template, "mcp-policy": policy_template, "marketing": marketing_template}
|
||||
|
||||
@@ -27,6 +27,7 @@ POLICY_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNqdVU1v2zAMvedXC
|
||||
REPOSITORY_POLICY_TEMPLATE = json.loads(zlib.decompress(base64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wabo6TGkSi2YbxW5G6Ge3/L5GyGu8j8bCaDKKuwkCiClU5iOemMwl2eKylyRNsUxxNez8S4Z+bUAqY4GZ4X/mU9qNUg7cRdsDVocYY2CjUTVOjSjg0aeNAubfPan9M8W5uBh6hlyNBRmb0E4p/MDP561DfIVtYvtSfgz8+vlzs8WPg6knZfhl4lXeZ/We1d7/0Hg+30Mg==")))
|
||||
HOMEBREW_TEMPLATE = json.loads(zlib.decompress(base64.b64decode("eNqVVNtu2zAMfc9XCMYeNqBurk7SAgXmpRlaIM2lTVYMy2AoMh2rtSVDknNBkX+fpCReLkWxvdjU4eERRVJ6KyHkLEBIyplzjWqX1QuDvPCZ1Ms3bRs/TmiIFbgKZwWq8ZCTVxAa+bVDUOGzfpriOWi3M4+JuKS8HPMUZgKWZfP5KmNc85rXFdDfegheu0a8eoVc6Z/XqFVIhJst8GbNyozMvEa11a7WrloA9QZpepU2wU1oNZq47hRbbnbW74t9hgIkzwWBgCRYmhM5MsVJ4hSEJRevlM2DkAogiou14dg8ywll+cpmmwn+or1/o4AtqOAsBaYO6qEdd4OH7rfH7nPQHwT+ZDwIJsNbf9w1otUi/JTX93s/x/edpw9Z9/2nsd/rBZ1e1+9PhlvujropEpMKMnnUEIfEQF55rg6Ej5okcnZ0BgsynNrG/QBBozXSJUNZglXERYpCvmQJx6FEmIWIMqmMW8WAYIWJQnpIkIAFtSN1caLLA51KlqtA0RRMVnoTLz2lEZ6mWtz2CxRyIecooxlEmCZTZnpid5k6n0ajUVCUaewPp45Bh8+3U2fKFEhllp/nVIt0rGmDXVdAxiU1DX9f5YsW0odwMywkoLuuf2uQm0LtzLdPS+TbPc8ldwwBODQFc125ZgqvtMHlzRbBgsTW/EggAkViQ04Sd98UqdeznCahGwmeutuhf0+lfIx8Hzw+THp+ob3v5v9H7mv972HOQc8353e4tF/Z6bYXNUr48vBZssN5+CDtnq2D6T96us6lS5vSH3rbZEU=")))
|
||||
APPLICATION_TEMPLATE = json.loads(zlib.decompress(base64.b64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W0qTzB2iKRpU6DPg832/dwFTJNH5H3UcGfj6H75IgojQPoAoyyi05MUA5nMPXKxVlFXK+aIXzBWYLiKOBTBlBITOah8S0Cm6kVl8zrmU5HPGh5DQ7WZU/ZzmkrCFHmI0nFXq9pmvBykXauoJlHG9huXqefiUMy3XU2baQVGt5BewqQRvwzT2kWgMcNK+smq28U/JO+4tpvLKvj5r2RONcw5NLNk1DoizyuAWwufkIFwxyOD8a1B4Jvx+1SdZCFVyuOllAX2oh1wXDtt0llNmh9Mc7aAMic4bAMWS4DgsCzdEc/bQK2k/mw3Q6iSuydU9vDzE5fLxwnfwK+q1Tab4yLAv/pscaCdMBIc+3jW/VdGjfOLzUjh4+T1pSg7l/3eDtbE3N8PnvJ+7FRceelv65U9Ane62GpkwwRcx2XwgKHKopWpXt004/26fN7zm6/OXJ9Ml3O8jdIv5b5013t2duR+C4nKShTrYdbxLHCP/zIbOz3ElSxQLALM9YoEDUd6iSgfLf0aMA5OZCZNNzFKzlwuaLEZcnUrGHsHxPUx+i/Y1LUrPS370TrW/7Y+fd658babTB6Ci+cYZ/1OXrs+Ks+bKOqRhICEJo+TfvwYvX36t78sIt9OZd+bb0Z/fP/g8czFPF")))
|
||||
|
||||
|
||||
class ManifestError(ValueError):
|
||||
@@ -71,7 +72,7 @@ def load_manifest(path, setup_version):
|
||||
if not isinstance(data, dict):
|
||||
raise ManifestError("Manifest must be a mapping")
|
||||
profile = data.get("profile")
|
||||
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap"):
|
||||
if profile not in ("qbit", "core", "frontend-material", "frontend-core", "cli", "voyage", "frontend-next", "all", "app-starter", "android", "mcp-policy", "repository-policy", "marketing", "node-artifact", "homebrew-tap", "application-template"):
|
||||
raise ManifestError("Unsupported profile")
|
||||
allowed = ("profile", "orb_version", "default_branch", "docs_only", "publish")
|
||||
if profile == "homebrew-tap":
|
||||
@@ -84,7 +85,7 @@ def load_manifest(path, setup_version):
|
||||
allowed += ("release_completion", "release_on_main", "release_tag_policy", "test_branch_policy")
|
||||
elif profile == "cli":
|
||||
allowed += ("publish_context",)
|
||||
elif profile in ("voyage", "frontend-next", "app-starter", "android", "mcp-policy", "repository-policy", "marketing"):
|
||||
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":
|
||||
allowed = ("profile", "orb_version", "default_branch", "publish", "publish_context")
|
||||
@@ -174,7 +175,7 @@ def load_manifest(path, setup_version):
|
||||
"release_tag_policy": tag_policy, "test_branch_policy": test_policy,
|
||||
"docs_only": boolean(data, "docs_only", False),
|
||||
"publish_context": publish_context,
|
||||
"publish": {key: boolean(publishing, key, key != "asciidoc" and profile not in ("cli", "all", "repository-policy")
|
||||
"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}}
|
||||
|
||||
@@ -516,7 +517,12 @@ def homebrew_template(config, branch, tag):
|
||||
return result
|
||||
|
||||
|
||||
PROFILE_TEMPLATES = {"homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
|
||||
def application_template(config, branch, tag):
|
||||
del config, branch, tag
|
||||
return copy.deepcopy(APPLICATION_TEMPLATE)
|
||||
|
||||
|
||||
PROFILE_TEMPLATES = {"application-template": application_template, "homebrew-tap": homebrew_template, "qbit": qbit_template, "core": core_template,
|
||||
"repository-policy": repository_policy_template,
|
||||
"frontend-material": frontend_template, "frontend-core": frontend_template,
|
||||
"cli": cli_template, "voyage": voyage_template, "frontend-next": next_template, "all": all_template, "app-starter": starter_template, "android": android_template, "mcp-policy": policy_template, "marketing": marketing_template}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
"version": 2.1,
|
||||
"jobs": {
|
||||
"verify-template": {
|
||||
"docker": [
|
||||
{
|
||||
"image": "cimg/openjdk:21.0"
|
||||
}
|
||||
],
|
||||
"resource_class": "medium",
|
||||
"steps": [
|
||||
"checkout",
|
||||
{
|
||||
"restore_cache": {
|
||||
"keys": [
|
||||
"qqq-template-v1-java21-d84a5783bf09c58e42ba72203247f20bd5779302"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Prepare pinned qctl renderer",
|
||||
"command": "set -euo pipefail\ntool_dir=\"${QQQ_TEMPLATE_TOOL_DIR:-$HOME/.cache/qqq-template-renderer}\"\nmaven_repo=\"${QQQ_TEMPLATE_MAVEN_REPO:-$HOME/.m2/repository}\"\nif [[ ! -d \"$tool_dir/.git\" ]]; then\n git init \"$tool_dir\"\n git -C \"$tool_dir\" remote add origin https://github.com/QRun-IO/qctl.git\n git -C \"$tool_dir\" fetch --depth=1 origin d84a5783bf09c58e42ba72203247f20bd5779302\n git -C \"$tool_dir\" checkout --detach FETCH_HEAD\nfi\ntest \"$(git -C \"$tool_dir\" rev-parse HEAD)\" = d84a5783bf09c58e42ba72203247f20bd5779302\n# Build the immutable, already-qualified renderer, not another copy of the consumer.\nif [[ ! -f \"$tool_dir/qctl-qqq/target/qctl-qqq-0.2.1.jar\" || ! -f \"$maven_repo/io/qrun/qctl/qctl-qqq/0.2.1/qctl-qqq-0.2.1.pom\" ]]; then\n mvn -B -ntp -f \"$tool_dir/pom.xml\" -Dmaven.repo.local=\"$maven_repo\" -pl qctl-qqq -am install -DskipTests\nfi\nmvn -B -ntp -f \"$tool_dir/pom.xml\" -Dmaven.repo.local=\"$maven_repo\" -pl qctl-qqq dependency:build-classpath -Dmdep.outputFile=\"$tool_dir/classpath.txt\"\n",
|
||||
"no_output_timeout": "10m"
|
||||
}
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Render the exact template checkout without hooks",
|
||||
"command": "set -euo pipefail\ntool_dir=\"${QQQ_TEMPLATE_TOOL_DIR:-$HOME/.cache/qqq-template-renderer}\"\noutput=\"${QQQ_TEMPLATE_OUTPUT:-$HOME/qqq-template-acceptance}\"\nwork=\"${QQQ_TEMPLATE_WORK:-/tmp/qqq-template-check}\"\nmkdir -p \"$work\"\ncurl --fail --silent --show-error --location --retry 2 --max-time 60 https://raw.githubusercontent.com/QRun-IO/qqq-templates-hub/4d22fc650967eee609107476d5dc3ac5dffeb071/templates.yaml -o \"$work/catalog.yaml\"\necho \"9342ef716f11ffea25a684fba6865e4daf303d968b5fa6a1ddcc6de43a6bb193 $work/catalog.yaml\" | sha256sum --check --status\ncat > \"$work/QqqTemplateCheck.java\" \\<<'JAVA'\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport com.fasterxml.jackson.dataformat.yaml.YAMLFactory;\nimport io.qrun.qctl.qqq.template.TemplateEngine;\nimport io.qrun.qctl.qqq.template.TemplateManifest;\nimport io.qrun.qctl.qqq.template.TransformExecutor;\n\npublic class QqqTemplateCheck\n{\n public static void main(String[] args) throws Exception\n {\n if(args.length != 3)\n {\n throw new IllegalArgumentException(\"Expected catalog, checked-out template, fresh output directory\");\n }\n Path output = Path.of(args[2]);\n if(Files.exists(output))\n {\n throw new IllegalArgumentException(\"Output directory must not exist\");\n }\n ObjectMapper mapper = new ObjectMapper(new YAMLFactory());\n JsonNode index = mapper.readTree(Path.of(args[0]).toFile());\n TemplateManifest manifest = null;\n for(JsonNode entry : index.get(\"templates\"))\n {\n if(\"new-qqq-application\".equals(entry.path(\"id\").asText()))\n {\n if(manifest != null) throw new IllegalArgumentException(\"Duplicate template entry\");\n manifest = mapper.treeToValue(entry, TemplateManifest.class);\n }\n }\n if(manifest == null) throw new IllegalArgumentException(\"Template missing from catalog\");\n TemplateEngine engine = new TemplateEngine();\n Map<String, String> variables = new LinkedHashMap<>(Map.of(\n \"projectName\", \"ci-template\", \"groupId\", \"io.qrun.ci\",\n \"artifactId\", \"ci-template\", \"packageName\", \"io.qrun.ci\"));\n variables = engine.evaluateComputed(manifest.computed(), variables);\n Files.createDirectories(output);\n int count = engine.render(Path.of(args[1]), output, variables, manifest);\n if(manifest.transforms() != null)\n {\n new TransformExecutor().execute(output, manifest.transforms(), variables);\n }\n if(count == 0 || !Files.isRegularFile(output.resolve(\"pom.xml\")))\n {\n throw new IllegalStateException(\"Renderer did not create the application\");\n }\n System.out.println(\"Rendered \" + count + \" files from the exact local template; hooks not executed\");\n }\n}\nJAVA\njava -cp \"$(cat \"$tool_dir/classpath.txt\"):$tool_dir/qctl-qqq/target/classes\" \"$work/QqqTemplateCheck.java\" \"$work/catalog.yaml\" \"$PWD\" \"$output\"\n"
|
||||
}
|
||||
},
|
||||
{
|
||||
"run": {
|
||||
"name": "Verify generated application and package",
|
||||
"command": "set -euo pipefail\nmvn -B -ntp -f \"${QQQ_TEMPLATE_OUTPUT:-$HOME/qqq-template-acceptance}/pom.xml\" -Dmaven.repo.local=\"${QQQ_TEMPLATE_MAVEN_REPO:-$HOME/.m2/repository}\" verify\n",
|
||||
"no_output_timeout": "10m"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_test_results": {
|
||||
"path": "~/qqq-template-acceptance/target/surefire-reports"
|
||||
}
|
||||
},
|
||||
{
|
||||
"store_artifacts": {
|
||||
"path": "~/qqq-template-acceptance/target/ci-template.jar",
|
||||
"destination": "generated-application.jar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"save_cache": {
|
||||
"key": "qqq-template-v1-java21-d84a5783bf09c58e42ba72203247f20bd5779302",
|
||||
"paths": [
|
||||
"~/.m2/repository",
|
||||
"~/.cache/qqq-template-renderer"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"workflows": {
|
||||
"verify": {
|
||||
"jobs": [
|
||||
"verify-template"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,7 @@ PROFILE_PARAMETERS = {
|
||||
"marketing": {},
|
||||
"node-artifact": {},
|
||||
"homebrew-tap": {},
|
||||
"application-template": {},
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +69,7 @@ def canonical_caller(profile, version, explicit_manifest=False, release_tag_poli
|
||||
"orb_version": version,
|
||||
"filters": {"branches": {"ignore": "automation/qbit-rc-pending"}, "tags": {"only": "/.*/"}},
|
||||
}
|
||||
if profile in ("node-artifact", "homebrew-tap"):
|
||||
if profile in ("node-artifact", "homebrew-tap", "application-template"):
|
||||
options["filters"]["tags"] = {"ignore": "/.*/"}
|
||||
if profile == "frontend-next":
|
||||
options["filters"]["branches"] = {"ignore": "/.*/"}
|
||||
|
||||
@@ -324,7 +324,7 @@ class AuditTests(unittest.TestCase):
|
||||
self.assertIn('native_maintenance_bridge_drift', [f['code'] for f in report['findings']])
|
||||
|
||||
def test_new_circle_profile_mappings_require_actual_configuration(self):
|
||||
for name, profile in [('qqq-android', 'android'), ('qqq-mcp-rag-standard-policies', 'mcp-policy'), ('marketing-website', 'marketing'), ('qqq-templates-hub', 'repository-policy'), ('qqq-meta-manager', 'repository-policy'), ('homebrew-qctl', 'homebrew-tap')]:
|
||||
for name, profile in [('qqq-android', 'android'), ('qqq-mcp-rag-standard-policies', 'mcp-policy'), ('marketing-website', 'marketing'), ('qqq-templates-hub', 'repository-policy'), ('qqq-meta-manager', 'repository-policy'), ('homebrew-qctl', 'homebrew-tap'), ('new-qqq-application-template', 'application-template')]:
|
||||
entry = dict(ENTRY, name=name, nameWithOwner='QRun-IO/' + name)
|
||||
report = audit.audit(entry, Snapshot({}), VERSION, SHA, {})
|
||||
self.assertEqual(profile, report['profile'])
|
||||
@@ -359,7 +359,7 @@ class AuditTests(unittest.TestCase):
|
||||
self.assertIn('missing_native_maintenance_bridge', [f['code'] for f in report['findings']])
|
||||
|
||||
def test_approved_no_ci_is_exact_allowlist_with_evidence_not_check_pass(self):
|
||||
self.assertEqual(4, len(audit.NO_CI))
|
||||
self.assertEqual(3, len(audit.NO_CI))
|
||||
self.assertNotIn("QRun-IO/voyage-cd", audit.NO_CI)
|
||||
for repository, policy in audit.NO_CI.items():
|
||||
entry = dict(ENTRY, name=repository.split('/')[-1], nameWithOwner=repository)
|
||||
|
||||
@@ -378,6 +378,26 @@ class PipelineTests(unittest.TestCase):
|
||||
for packed in ([False, True] if PACKED else [False]):
|
||||
self.assert_full(self.render(packed=packed, CIRCLE_BRANCH="", CIRCLE_TAG="publish-test"))
|
||||
|
||||
def test_application_template_source_and_packed_is_exact_source_acceptance(self):
|
||||
self.write_manifest(profile="application-template")
|
||||
for packed in ([False, True] if PACKED else [False]):
|
||||
result = self.render(packed=packed, CIRCLE_BRANCH="main")
|
||||
self.assertEqual({"verify": {"jobs": ["verify-template"]}}, result["workflows"])
|
||||
self.assertEqual({"verify-template"}, set(result["jobs"]))
|
||||
job = result["jobs"]["verify-template"]
|
||||
self.assertEqual("cimg/openjdk:21.0", job["docker"][0]["image"])
|
||||
runs = [step["run"]["command"] for step in job["steps"] if isinstance(step, dict) and "run" in step]
|
||||
self.assertEqual(3, len(runs))
|
||||
self.assertIn('"$PWD" "$output"', runs[1])
|
||||
self.assertIn('engine.render(Path.of(args[1])', runs[1])
|
||||
self.assertNotIn('PostGenExecutor', runs[1])
|
||||
self.assertIn(' verify', runs[2])
|
||||
self.assertNotIn('skipTests', runs[2])
|
||||
self.assertNotIn('deploy', runs[2])
|
||||
for invalid in ({"publish": {"release": True}}, {"command": "true"}, {"renderer_sha": "main"}):
|
||||
self.write_manifest(profile="application-template", **invalid)
|
||||
self.render(ok=False)
|
||||
|
||||
def test_homebrew_source_and_packed_is_one_nonpublishing_job(self):
|
||||
self.write_manifest(profile="homebrew-tap", tap="qrun-io/qctl", formula="qctl")
|
||||
for packed in ([False, True] if PACKED else [False]):
|
||||
|
||||
@@ -46,7 +46,7 @@ PROFILES = {'qqq': 'core', 'qqq-frontend-material-dashboard': 'frontend-material
|
||||
'qqq-android': 'android', 'qqq-mcp-rag-standard-policies': 'mcp-policy',
|
||||
'marketing-website': 'marketing', 'qqq-mcp-rag': 'native-mcp',
|
||||
'qqq-business-platform': 'native-business', '.github': 'native-workflow-lint',
|
||||
'homebrew-qctl': 'homebrew-tap', 'qqq-meta-manager': 'repository-policy', 'qqq-templates-hub': 'repository-policy', 'qqq-orb': 'owner-bootstrap', 'marketing-website-cd': 'native-gitops', 'voyage-cd': 'native-gitops'}
|
||||
'new-qqq-application-template': 'application-template', 'homebrew-qctl': 'homebrew-tap', 'qqq-meta-manager': 'repository-policy', 'qqq-templates-hub': 'repository-policy', 'qqq-orb': 'owner-bootstrap', 'marketing-website-cd': 'native-gitops', 'voyage-cd': 'native-gitops'}
|
||||
NO_CI = json.loads((ROOT / 'tools/no-ci-policy.json').read_text(encoding='utf-8'))
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ standard = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(standard)
|
||||
DESIRED = [{'context': name, 'app_id': 18001} for name in ('setup', 'verify')]
|
||||
PROFILE_GATES = {profile: 'verify' for profile in (
|
||||
'qbit', 'core', 'frontend-core', 'frontend-material', 'repository-policy', 'node-artifact', 'homebrew-tap', 'marketing', 'voyage')}
|
||||
'qbit', 'core', 'frontend-core', 'frontend-material', 'repository-policy', 'node-artifact', 'homebrew-tap', 'application-template', 'marketing', 'voyage')}
|
||||
PROFILE_GATES.update({'all': 'verify-and-smoke', 'cli': 'test_only',
|
||||
'app-starter': 'test_only', 'android': 'test-and-build',
|
||||
'mcp-policy': 'validate'})
|
||||
|
||||
@@ -1,20 +1,4 @@
|
||||
{
|
||||
"QRun-IO/new-qqq-application-template": {
|
||||
"baseline_sha": "730a836a666535a361927d83f15720e91eb71541",
|
||||
"required_paths": [
|
||||
"README.md"
|
||||
],
|
||||
"forbidden_prefixes": [
|
||||
".circleci/",
|
||||
".github/workflows/"
|
||||
],
|
||||
"forbidden_paths": [
|
||||
".qqq-ci.yml",
|
||||
"Jenkinsfile",
|
||||
".gitlab-ci.yml"
|
||||
],
|
||||
"rationale": "Template source; core generated-consumer acceptance owns validation."
|
||||
},
|
||||
"QRun-IO/qqq-maven-registry": {
|
||||
"baseline_sha": "134576e4e701984635105f97c8f52aa1e27205b2",
|
||||
"required_paths": [
|
||||
|
||||
Reference in new issue
Block a user