Files
test/resources/image_manifests/stx-test-images-mixed-registries.yaml
Andrew Vaillancourt 0796e5062a PoC: manifest-driven image sync for test images
This patch introduces a foundational test and keyword framework
for syncing Docker images from external registries (e.g., DockerHub)
into the local StarlingX registry at registry.local:9001. Sync
behavior is driven by YAML manifests and resolved using the
JSON5-based ConfigurationManager system already used throughout
starlingx/test.

Key Features:
- Supports multiple image manifests and logical registry mappings
  defined in config/docker/files/default.json5.
- Registry resolution follows:
  1. source_registry field (per image in manifest)
  2. manifest_registry_map (per manifest)
  3. default_source_registry (global fallback)
- Test coverage verifies that registry resolution honors override
  order, ensuring images are pulled from the correct source based
  on per-image fields and per-manifest mappings, using
  default_source_registry only when no override is provided.

Forward Compatibility:
- The config and manifest format is designed to support future
  extensions such as digest pinning, curated test image sets,
  or internal registry mirroring.
- Test images currently reference stable tags from
  https://hub.docker.com/u/starlingx and will later be moved to
  a dedicated test image repo.

This patch lays the foundation for managing image dependencies
through versioned manifests rather than bundling image binaries
in the repository.

Change-Id: Ib0bdf8ade444f079b141baed680eb1e71ed7cd0a
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
2025-06-12 02:52:12 -04:00

32 lines
1.6 KiB
YAML

# ------------------------------------------------------------------------------
# Image Manifest: stx-test-images-mixed-registries.yaml
#
# This manifest defines a mix of Docker images to be synchronized from multiple
# source registries (e.g., DockerHub and Harbor) into the local registry.
#
# Purpose:
# - Validates manifest-driven image sync logic across different registry backends.
# - Demonstrates per-image control over the source registry via `source_registry`.
#
# Notes:
# - Each image entry must include both `name` and `tag`.
# - Use logical registry names (not raw URLs) in the `source_registry` field.
# - The name must match a key under `registries` in the Docker config file.
# - This file defaults to `config/docker/files/default.json5`, but can be overridden using `--docker_config_file`.
# - Examples: `dockerhub`, `harbor`
# - Image names must include full namespace (e.g., starlingx/stx-keystone).
# - Registry resolution is handled dynamically via ConfigurationManager.
# - Resolution priority (from most to least specific):
# 1. `source_registry` field on the image entry (optional)
# 2. `manifest_registry_map` in config/docker/files/default.json5
# 3. `default_source_registry` in config/docker/files/default.json5
# ------------------------------------------------------------------------------
images:
- name: "starlingx/stx-keystone"
tag: "master-debian-stable-20250530T120001Z.0"
source_registry: "dockerhub"
- name: "examplecorp/network-soak-test"
tag: "1.4.2"
source_registry: "harbor" # Logical registry name from docker config e.g. config/docker/files/default.json5.