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>
38 lines
1.5 KiB
YAML
38 lines
1.5 KiB
YAML
# ------------------------------------------------------------------------------
|
|
# Image Manifest: `stx-test-images-invalid.yaml`
|
|
#
|
|
# This manifest defines invalid or non-existent Docker images to simulate partial
|
|
# sync failures for testing purposes.
|
|
#
|
|
# Purpose:
|
|
# - Verifies sync logic when some images fail (e.g., bad tags or missing images).
|
|
# - Used for testing failure paths in `test_docker_image_sync.py`.
|
|
#
|
|
# Notes:
|
|
# - Each image entry must include both `name` and `tag`.
|
|
# - Image names must include their full namespace (e.g., `starlingx/stx-keystone`).
|
|
# - Registry URLs and credentials are not listed here. They are defined in:
|
|
# `config/docker/files/default.json5`
|
|
# - Registry resolution is handled dynamically via `ConfigurationManager`.
|
|
# - Resolution priority (from most to least specific):
|
|
# 1. `source_registry` field on the individual image entry (optional)
|
|
# 2. `manifest_registry_map` entry in `config/docker/files/default.json5`
|
|
# 3. `default_source_registry` in `config/docker/files/default.json5`
|
|
# ------------------------------------------------------------------------------
|
|
images:
|
|
- name: "starlingx/stx-platformclients"
|
|
tag: "stx.11.0-v1.0.1"
|
|
# This image and tag are valid
|
|
|
|
- name: "starlingx/stx-platformclients"
|
|
tag: "made-up-tag"
|
|
# This tag is invalid
|
|
|
|
- name: "starlingx/stx-keystone"
|
|
tag: "master-debian-stable-20250530T120001Z.0"
|
|
# This image and tag are valid
|
|
|
|
- name: "starlingx/stx-non-existent"
|
|
tag: "stx.11.0-v1.0.1"
|
|
# This image does not exist
|