summaryrefslogtreecommitdiffstats
path: root/recipes-containers
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2026-03-11 23:20:07 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2026-03-11 23:20:07 +0000
commitaa18b46a7a70a782510d8ba0b7fa5378c6d3630f (patch)
treea2878eb2645474e809ac5a9d10759a2981e2b46d /recipes-containers
parent21054f23adf37881a8ecae65da5ce0ebd5948b96 (diff)
downloadmeta-virtualization-aa18b46a7a70a782510d8ba0b7fa5378c6d3630f.tar.gz
container-registry: drop container-registry-populate
Somehow we have two similar registry recipes that were developed from a different pont of view. We don't need both. container-registry-index is the mature, QA-compliant version that also generates the standalone container-registry.sh helper script. container-registry-populate is an older, simpler version that does only the push, so we drop it here Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers')
-rw-r--r--recipes-containers/container-registry/README.md1
-rw-r--r--recipes-containers/container-registry/container-registry-populate.bb109
2 files changed, 0 insertions, 110 deletions
diff --git a/recipes-containers/container-registry/README.md b/recipes-containers/container-registry/README.md
index 470442b9..e98589b8 100644
--- a/recipes-containers/container-registry/README.md
+++ b/recipes-containers/container-registry/README.md
@@ -473,7 +473,6 @@ This installs:
473| File | Description | 473| File | Description |
474|------|-------------| 474|------|-------------|
475| `container-registry-index.bb` | Generates helper script with baked-in paths | 475| `container-registry-index.bb` | Generates helper script with baked-in paths |
476| `container-registry-populate.bb` | Alternative bitbake-driven push |
477| `container-registry-ca.bb` | Target package for CA certificate (secure mode) | 476| `container-registry-ca.bb` | Target package for CA certificate (secure mode) |
478| `container-oci-registry-config.bb` | OCI tools config (Podman/Skopeo/Buildah/CRI-O) | 477| `container-oci-registry-config.bb` | OCI tools config (Podman/Skopeo/Buildah/CRI-O) |
479| `docker-registry-config.bb` | Docker daemon config | 478| `docker-registry-config.bb` | Docker daemon config |
diff --git a/recipes-containers/container-registry/container-registry-populate.bb b/recipes-containers/container-registry/container-registry-populate.bb
deleted file mode 100644
index d44b1051..00000000
--- a/recipes-containers/container-registry/container-registry-populate.bb
+++ /dev/null
@@ -1,109 +0,0 @@
1# SPDX-FileCopyrightText: Copyright (C) 2025 Bruce Ashfield
2#
3# SPDX-License-Identifier: MIT
4#
5# container-registry-populate.bb
6# ===========================================================================
7# Push OCI container images from deploy directory to a container registry
8# ===========================================================================
9#
10# This recipe discovers OCI images in DEPLOY_DIR_IMAGE and pushes them
11# to the configured container registry using skopeo.
12#
13# Usage:
14# # Set registry URL (default: localhost:5000)
15# CONTAINER_REGISTRY_URL = "localhost:5000"
16#
17# # Push all discovered images
18# bitbake container-registry-populate
19#
20# # Push specific images only
21# CONTAINER_REGISTRY_IMAGES = "container-base container-app"
22# bitbake container-registry-populate
23#
24# Prerequisites:
25# - docker-distribution-native built and running
26# - Container images built (bitbake container-base)
27#
28# ===========================================================================
29
30SUMMARY = "Push container images to registry"
31DESCRIPTION = "Discovers OCI images in the deploy directory and pushes them \
32to the configured container registry using skopeo. Works with docker-distribution, \
33Docker Hub, or any OCI-compliant registry."
34
35LICENSE = "MIT"
36LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
37
38inherit container-registry
39
40# Additional dependencies
41DEPENDS += "docker-distribution-native"
42
43# Specific images to push (empty = auto-discover all)
44CONTAINER_REGISTRY_IMAGES ?= ""
45
46# Work directory
47S = "${WORKDIR}/sources"
48
49do_unpack[noexec] = "1"
50do_patch[noexec] = "1"
51do_configure[noexec] = "1"
52do_compile[noexec] = "1"
53do_install[noexec] = "1"
54
55python do_populate_registry() {
56 """Push OCI images to the configured registry."""
57 import os
58
59 registry = d.getVar('CONTAINER_REGISTRY_URL')
60 namespace = d.getVar('CONTAINER_REGISTRY_NAMESPACE')
61 specific_images = (d.getVar('CONTAINER_REGISTRY_IMAGES') or '').split()
62
63 bb.note(f"Container Registry: {registry}/{namespace}/")
64 bb.note(f"Tag Strategy: {d.getVar('CONTAINER_REGISTRY_TAG_STRATEGY')}")
65
66 # Discover OCI images
67 all_images = container_registry_discover_oci_images(d)
68
69 if not all_images:
70 bb.warn("No OCI images found in deploy directory")
71 bb.note(f"Deploy directory: {d.getVar('DEPLOY_DIR_IMAGE')}")
72 bb.note("Build container images first: bitbake container-base")
73 return
74
75 bb.note(f"Discovered {len(all_images)} OCI images")
76
77 # Filter if specific images requested
78 if specific_images:
79 images = [(path, name) for path, name in all_images if name in specific_images]
80 if not images:
81 bb.warn(f"None of the requested images found: {specific_images}")
82 bb.note(f"Available images: {[name for _, name in all_images]}")
83 return
84 else:
85 images = all_images
86
87 # Push each image
88 pushed_refs = []
89 for oci_path, image_name in images:
90 bb.note(f"Processing: {image_name} from {oci_path}")
91 refs = container_registry_push(d, oci_path, image_name)
92 pushed_refs.extend(refs)
93
94 # Summary
95 bb.note("=" * 60)
96 bb.note(f"Pushed {len(pushed_refs)} image references:")
97 for ref in pushed_refs:
98 bb.note(f" {ref}")
99 bb.note("=" * 60)
100}
101
102# Run after prepare_recipe_sysroot so skopeo-native is available
103addtask populate_registry after do_prepare_recipe_sysroot before do_build
104
105# Allow network access for pushing to registry
106do_populate_registry[network] = "1"
107
108# Don't cache - always push fresh
109do_populate_registry[nostamp] = "1"