mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
refactor(images): drop the pkgmgr image reference nothing builds any more
962c3d550d made the images build FROM the distribution base, which left the pkgmgr reference in the distro matrix without a producer: utils.distros still rendered it, the image-ref CLI still offered it as a kind, and no caller asked for either.
The requirements-archive target goes with them as the last build-path use of pkgmgr; its alias follows. The pkgmgr-install role is a different thing, installs tools on the target host, and stays where the deprecation lint can keep pointing at pip.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0d2fadce0c
commit
efaed0dbb9
7 files changed
+4
-35
No files matched your search
@@ -633,12 +633,6 @@ quality:
|
||||
# Full gate: quality (autoformat + test) followed by every lint check.
|
||||
quality-high: quality lint
|
||||
|
||||
.PHONY: requirements-archive
|
||||
# Archive fully-checked requirement files via pkgmgr (installs kpmx if missing).
|
||||
requirements-archive:
|
||||
@"$${PYTHON}" -m pip install --quiet --upgrade kpmx
|
||||
@"$${PYTHON}" -m pkgmgr archive docs/requirements
|
||||
|
||||
.PHONY: roundtrip
|
||||
# Validate one or more roles through every deploy mode in order (compose, then swarm), stopping at the first failure.
|
||||
# Param apps: space-separated role ids; default = one role per base cluster, most-complex first (complexity --unique).
|
||||
|
||||
@@ -124,7 +124,6 @@ alias i8puma='__i8puma(){ local gates=() ok=1; case "${3:-}" in "") ;; true|fals
|
||||
alias i8puwl='__i8puwl(){ [ -z "${1:-}" ] && { echo "usage: i8puwl <whitelist app ids> [distros]" >&2; return 2; }; i8source && gh workflow run entry-manual.yml --repo "$(git remote get-url "$(git config --get remote.pushDefault)")" --ref "$(git rev-parse --abbrev-ref HEAD)" -f whitelist="$(python3 -m utils.roles.display --encode "$1")" -f distros="${2:-${INFINITO_DISTROS}}" -f workspace=false -f instructions=false; }; __i8puwl' # dispatch a manual CI run on the push remote (remote.pushDefault) limited to whitelist $1, distros $2 (default INFINITO_DISTROS), with the workspace and instructions tests off; pushes nothing, so the run uses whatever the remote already holds for the current branch
|
||||
alias i8qu='m quality'
|
||||
alias i8quhi='m quality-high'
|
||||
alias i8re='m requirements-archive'
|
||||
alias i8ro='m roundtrip'
|
||||
alias i8ru='m runner-ci-deploy'
|
||||
alias i8ruci='m runner-ci-disable'
|
||||
|
||||
@@ -12,12 +12,7 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
from utils.distros import (
|
||||
IMAGE_ENVIRONMENT,
|
||||
IMAGE_PKGMGR,
|
||||
environment_image,
|
||||
pkgmgr_image,
|
||||
)
|
||||
from utils.distros import IMAGE_ENVIRONMENT, environment_image
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
@@ -25,7 +20,7 @@ def main(argv: list[str] | None = None) -> int:
|
||||
parser.add_argument(
|
||||
"--kind",
|
||||
required=True,
|
||||
choices=(IMAGE_PKGMGR, IMAGE_ENVIRONMENT),
|
||||
choices=(IMAGE_ENVIRONMENT,),
|
||||
help="Which image reference to render.",
|
||||
)
|
||||
parser.add_argument("--distro", required=True, help="Distro id, e.g. debian.")
|
||||
@@ -38,10 +33,6 @@ def main(argv: list[str] | None = None) -> int:
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
if args.kind == IMAGE_PKGMGR:
|
||||
print(pkgmgr_image(args.distro, owner=args.owner, tag=args.tag))
|
||||
return 0
|
||||
|
||||
if not args.repository:
|
||||
parser.error("--repository is required for --kind environment")
|
||||
print(
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
images:
|
||||
base: "ghcr.io/{owner}/base-{slug}:{tag}"
|
||||
pkgmgr: "ghcr.io/{owner}/pkgmgr-{slug}:{tag}"
|
||||
environment: "ghcr.io/{owner}/{repository}/{slug}:{tag}"
|
||||
|
||||
galaxy_platform_versions:
|
||||
|
||||
@@ -27,7 +27,6 @@ from utils.cache.yaml import load_yaml_any
|
||||
from utils.distros import (
|
||||
FILE_META_DISTROS,
|
||||
IMAGE_BASE,
|
||||
IMAGE_PKGMGR,
|
||||
dev_runtime_images,
|
||||
distro_names,
|
||||
image_template,
|
||||
@@ -197,7 +196,7 @@ class TestDistrosSpot(unittest.TestCase):
|
||||
slug=_SHELL_LOOP_SLUG,
|
||||
tag=static["INFINITO_PARENT_IMAGE_TAG"],
|
||||
)
|
||||
for kind in (IMAGE_BASE, IMAGE_PKGMGR)
|
||||
for kind in (IMAGE_BASE,)
|
||||
}
|
||||
|
||||
offenders = [
|
||||
|
||||
@@ -13,7 +13,6 @@ from utils.distros import (
|
||||
distro_of_dev_runtime_image,
|
||||
environment_image,
|
||||
galaxy_platforms,
|
||||
pkgmgr_image,
|
||||
)
|
||||
|
||||
|
||||
@@ -50,12 +49,6 @@ class TestDistroSpot(unittest.TestCase):
|
||||
first[0]["versions"].append("mutated")
|
||||
self.assertEqual(galaxy_platforms()[0]["versions"], ["all"])
|
||||
|
||||
def test_pkgmgr_image_renders_the_template(self) -> None:
|
||||
self.assertEqual(
|
||||
pkgmgr_image("arch", owner="acme", tag="stable"),
|
||||
"ghcr.io/acme/pkgmgr-arch:stable",
|
||||
)
|
||||
|
||||
def test_environment_image_renders_the_template(self) -> None:
|
||||
self.assertEqual(
|
||||
environment_image("centos", owner="acme", repository="nexus", tag="ci-1"),
|
||||
@@ -64,7 +57,7 @@ class TestDistroSpot(unittest.TestCase):
|
||||
|
||||
def test_unknown_distro_is_rejected(self) -> None:
|
||||
with self.assertRaises(UnknownDistroError):
|
||||
pkgmgr_image("gentoo", owner="acme", tag="stable")
|
||||
environment_image("gentoo", owner="acme", repository="nexus", tag="stable")
|
||||
|
||||
def test_dev_runtime_image_round_trips_to_its_distro(self) -> None:
|
||||
for name in distro_names():
|
||||
|
||||
@@ -31,7 +31,6 @@ from utils.yaml_bootstrap import load_block
|
||||
FILE_META_DISTROS: str = "meta/distros.yml"
|
||||
|
||||
IMAGE_BASE = "base"
|
||||
IMAGE_PKGMGR = "pkgmgr"
|
||||
IMAGE_ENVIRONMENT = "environment"
|
||||
|
||||
|
||||
@@ -119,11 +118,6 @@ def base_image(distro: str, owner: str, tag: str) -> str:
|
||||
return _render(IMAGE_BASE, distro, owner=owner, tag=tag)
|
||||
|
||||
|
||||
def pkgmgr_image(distro: str, owner: str, tag: str) -> str:
|
||||
"""Reference of the pkgmgr image the `pkgmgr install` test boots."""
|
||||
return _render(IMAGE_PKGMGR, distro, owner=owner, tag=tag)
|
||||
|
||||
|
||||
def environment_image(distro: str, owner: str, repository: str, tag: str) -> str:
|
||||
"""Reference of the environment image built for a distro."""
|
||||
return _render(
|
||||
|
||||
Reference in new issue
Block a user