Skip to content

Commit e2e8447

Browse files
Merge pull request #3012 from jogeo/art_image_build_w_group1_parent
USHIFT-2344: Add layer4 image-blueprints to support creating images with RPMs buillt elsewhere
2 parents ea4efd5 + 65e0dea commit e2e8447

File tree

5 files changed

+149
-5
lines changed

5 files changed

+149
-5
lines changed

test/bin/build_images.sh

+13-5
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,8 @@ build_images.sh [-iIsdf] [-l layer-dir | -g group-dir] [-t template]
545545
546546
-d Dry run by skipping the composer start commands.
547547
548+
-E Do not extract container images.
549+
548550
-f Force rebuilding images that already exist.
549551
550552
-g DIR Build only one group (cannot be used with -l or -t).
@@ -580,13 +582,16 @@ GROUP=""
580582
TEMPLATE=""
581583
FORCE_REBUILD=false
582584
FORCE_SOURCE=false
585+
EXTRACT_CONTAINER_IMAGES=true
583586

584587
selCount=0
585-
while getopts "dfg:hiIl:sSt:" opt; do
588+
while getopts "dEfg:hiIl:sSt:" opt; do
586589
case "${opt}" in
587590
d)
588591
COMPOSER_DRY_RUN=true
589592
;;
593+
E) EXTRACT_CONTAINER_IMAGES=false
594+
;;
590595
f)
591596
FORCE_REBUILD=true
592597
;;
@@ -682,10 +687,13 @@ configure_package_sources
682687

683688
# Prepare container lists for mirroring registries.
684689
rm -f "${CONTAINER_LIST}"
685-
extract_container_images "${SOURCE_VERSION}" "${LOCAL_REPO}" "${CONTAINER_LIST}"
686-
extract_container_images "4.${FAKE_NEXT_MINOR_VERSION}.*" "${NEXT_REPO}" "${CONTAINER_LIST}"
687-
extract_container_images "4.${FAKE_YPLUS2_MINOR_VERSION}.*" "${YPLUS2_REPO}" "${CONTAINER_LIST}"
688-
extract_container_images "${PREVIOUS_RELEASE_VERSION}" "${PREVIOUS_RELEASE_REPO}" "${CONTAINER_LIST}"
690+
if ${EXTRACT_CONTAINER_IMAGES}; then
691+
extract_container_images "${SOURCE_VERSION}" "${LOCAL_REPO}" "${CONTAINER_LIST}"
692+
# The following images are specific to layers that use fake rpms built from source.
693+
extract_container_images "4.${FAKE_NEXT_MINOR_VERSION}.*" "${NEXT_REPO}" "${CONTAINER_LIST}"
694+
extract_container_images "4.${FAKE_YPLUS2_MINOR_VERSION}.*" "${YPLUS2_REPO}" "${CONTAINER_LIST}"
695+
extract_container_images "${PREVIOUS_RELEASE_VERSION}" "${PREVIOUS_RELEASE_REPO}" "${CONTAINER_LIST}"
696+
fi
689697

690698
trap 'osbuild_logs' EXIT
691699

Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rhel-92-microshift-ext
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name = "rhel-92-microshift-ext"
2+
description = "A RHEL 9.2 image built from external RPMs."
3+
version = "0.0.1"
4+
modules = []
5+
groups = []
6+
distro = "rhel-92"
7+
8+
[[packages]]
9+
name = "microshift"
10+
version = "{{ .Env.SOURCE_VERSION }}"
11+
12+
[[packages]]
13+
name = "microshift-greenboot"
14+
version = "{{ .Env.SOURCE_VERSION }}"
15+
16+
[[packages]]
17+
name = "microshift-networking"
18+
version = "{{ .Env.SOURCE_VERSION }}"
19+
20+
[[packages]]
21+
name = "microshift-selinux"
22+
version = "{{ .Env.SOURCE_VERSION }}"
23+
24+
[[packages]]
25+
name = "systemd-resolved"
26+
version = "*"
27+
28+
[[packages]]
29+
name = "iputils"
30+
version = "*"
31+
32+
[[packages]]
33+
name = "bind-utils"
34+
version = "*"
35+
36+
[[packages]]
37+
name = "net-tools"
38+
version = "*"
39+
40+
[[packages]]
41+
name = "iotop"
42+
version = "*"
43+
44+
[[packages]]
45+
name = "strace"
46+
version = "*"
47+
48+
[[packages]]
49+
name = "iproute-tc"
50+
version = "*"
51+
52+
[[packages]]
53+
name = "kernel-modules-extra"
54+
version = "*"
55+
56+
[customizations.services]
57+
enabled = ["microshift"]
58+
59+
[customizations.firewall]
60+
ports = ["22:tcp", "80:tcp", "443:tcp", "5353:udp", "6443:tcp", "30000-32767:tcp", "30000-32767:udp"]
61+
62+
[customizations.firewall.services]
63+
enabled = ["mdns", "ssh", "http", "https"]
64+
65+
[[customizations.firewall.zones]]
66+
name = "trusted"
67+
sources = ["10.42.0.0/16", "169.254.169.1"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rhel-93-microshift-ext
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name = "rhel-93-microshift-ext
2+
description = "A RHEL 9.3 image built with external RPMs."
3+
version = "0.0.1"
4+
modules = []
5+
groups = []
6+
distro = "rhel-93"
7+
8+
[[packages]]
9+
name = "microshift"
10+
version = "{{ .Env.SOURCE_VERSION }}"
11+
12+
[[packages]]
13+
name = "microshift-greenboot"
14+
version = "{{ .Env.SOURCE_VERSION }}"
15+
16+
[[packages]]
17+
name = "microshift-networking"
18+
version = "{{ .Env.SOURCE_VERSION }}"
19+
20+
[[packages]]
21+
name = "microshift-selinux"
22+
version = "{{ .Env.SOURCE_VERSION }}"
23+
24+
[[packages]]
25+
name = "systemd-resolved"
26+
version = "*"
27+
28+
[[packages]]
29+
name = "iputils"
30+
version = "*"
31+
32+
[[packages]]
33+
name = "bind-utils"
34+
version = "*"
35+
36+
[[packages]]
37+
name = "net-tools"
38+
version = "*"
39+
40+
[[packages]]
41+
name = "iotop"
42+
version = "*"
43+
44+
[[packages]]
45+
name = "strace"
46+
version = "*"
47+
48+
[[packages]]
49+
name = "iproute-tc"
50+
version = "*"
51+
52+
[[packages]]
53+
name = "kernel-modules-extra"
54+
version = "*"
55+
56+
[customizations.services]
57+
enabled = ["microshift"]
58+
59+
[customizations.firewall]
60+
ports = ["22:tcp", "80:tcp", "443:tcp", "5353:udp", "6443:tcp", "30000-32767:tcp", "30000-32767:udp"]
61+
62+
[customizations.firewall.services]
63+
enabled = ["mdns", "ssh", "http", "https"]
64+
65+
[[customizations.firewall.zones]]
66+
name = "trusted"
67+
sources = ["10.42.0.0/16", "169.254.169.1"]

0 commit comments

Comments
 (0)