Skip to content

Commit ec9cac7

Browse files
authored
Merge pull request #482 from SUSE/stop_sp4
Stop generating language pack and application stacks for SP4
2 parents 9ae6d6a + cff6d28 commit ec9cac7

3 files changed

Lines changed: 43 additions & 43 deletions

File tree

src/bci_build/package.py

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def __str__(self) -> str:
120120
class OsVersion(enum.Enum):
121121
"""Enumeration of the base operating system versions for BCI."""
122122

123+
#: SLE 15 Service Pack 6
124+
SP6 = 6
123125
#: SLE 15 Service Pack 5
124126
SP5 = 5
125127
#: SLE 15 Service Pack 4
@@ -157,7 +159,14 @@ def pretty_os_version_no_dash(self) -> str:
157159
#: to ``released``.
158160
RELEASED_OS_VERSIONS = [OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED]
159161

160-
ALL_OS_VERSIONS = [OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED]
162+
# For which versions to create Application and Language Containers?
163+
ALL_NONBASE_OS_VERSIONS = [OsVersion.SP5, OsVersion.TUMBLEWEED]
164+
165+
# For which versions to create Base Container Images?
166+
ALL_BASE_OS_VERSIONS = [OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED]
167+
168+
# joint set of BASE and NON_BASE versions
169+
ALL_OS_VERSIONS = {v for v in (*ALL_BASE_OS_VERSIONS, *ALL_NONBASE_OS_VERSIONS)}
161170

162171
CAN_BE_LATEST_OS_VERSION = [OsVersion.SP5, OsVersion.TUMBLEWEED]
163172

@@ -1250,7 +1259,7 @@ def _get_python_kwargs(
12501259
package_name="python-3.6-image",
12511260
support_level=SupportLevel.L3,
12521261
)
1253-
for os_version in (OsVersion.SP4, OsVersion.SP5)
1262+
for os_version in (OsVersion.SP5,)
12541263
)
12551264

12561265
_PYTHON_TW_VERSIONS = ("3.9", "3.10", "3.11")
@@ -1279,7 +1288,7 @@ def _get_python_kwargs(
12791288
supported_until=datetime.date(2027, 12, 31),
12801289
is_latest=os_version in CAN_BE_LATEST_OS_VERSION,
12811290
)
1282-
for os_version in (OsVersion.SP4, OsVersion.SP5)
1291+
for os_version in (OsVersion.SP5,)
12831292
)
12841293

12851294

@@ -1337,10 +1346,6 @@ def _get_ruby_kwargs(ruby_version: Literal["2.5", "3.2"], os_version: OsVersion)
13371346

13381347

13391348
RUBY_CONTAINERS = [
1340-
LanguageStackContainer(
1341-
**_get_ruby_kwargs("2.5", OsVersion.SP4),
1342-
support_level=SupportLevel.L3,
1343-
),
13441349
LanguageStackContainer(
13451350
**_get_ruby_kwargs("2.5", OsVersion.SP5),
13461351
support_level=SupportLevel.L3,
@@ -1391,7 +1396,7 @@ def _get_golang_kwargs(ver: _GO_VER_T, os_version: OsVersion):
13911396
LanguageStackContainer(
13921397
**_get_golang_kwargs(ver, os_version), support_level=SupportLevel.L3
13931398
)
1394-
for ver, os_version in product(_GOLANG_VERSIONS, ALL_OS_VERSIONS)
1399+
for ver, os_version in product(_GOLANG_VERSIONS, ALL_NONBASE_OS_VERSIONS)
13951400
]
13961401

13971402
# see https://raw.githubusercontent.com/nodejs/Release/main/README.md
@@ -1436,10 +1441,12 @@ def _get_node_kwargs(ver: Literal[16, 18, 20], os_version: OsVersion):
14361441

14371442
NODE_CONTAINERS = [
14381443
LanguageStackContainer(
1439-
**_get_node_kwargs(ver, os_version), support_level=SupportLevel.L3
1440-
)
1441-
for ver, os_version in list(product((16, 18), (OsVersion.SP4, OsVersion.SP5)))
1442-
+ [(20, OsVersion.TUMBLEWEED)]
1444+
**_get_node_kwargs(16, OsVersion.SP5), support_level=SupportLevel.L3
1445+
),
1446+
LanguageStackContainer(
1447+
**_get_node_kwargs(18, OsVersion.SP5), support_level=SupportLevel.L3
1448+
),
1449+
LanguageStackContainer(**_get_node_kwargs(20, OsVersion.TUMBLEWEED)),
14431450
]
14441451

14451452

@@ -1496,17 +1503,15 @@ def _get_openjdk_kwargs(
14961503
**_get_openjdk_kwargs(os_version, devel, 11), support_level=SupportLevel.L3
14971504
)
14981505
for os_version, devel in product(
1499-
ALL_OS_VERSIONS,
1506+
ALL_NONBASE_OS_VERSIONS,
15001507
(True, False),
15011508
)
15021509
] + [
15031510
LanguageStackContainer(
15041511
**_get_openjdk_kwargs(os_version=os_version, devel=devel, java_version=17),
15051512
support_level=SupportLevel.L3,
15061513
)
1507-
for os_version, devel in product(
1508-
(OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED), (True, False)
1509-
)
1514+
for os_version, devel in product(ALL_NONBASE_OS_VERSIONS, (True, False))
15101515
]
15111516

15121517

@@ -1674,11 +1679,8 @@ def _create_php_bci(
16741679

16751680

16761681
PHP_CONTAINERS = [
1677-
_create_php_bci(os_version, variant, 8)
1678-
for os_version, variant in product(
1679-
(OsVersion.SP4, OsVersion.SP5),
1680-
(PhpVariant.cli, PhpVariant.apache, PhpVariant.fpm),
1681-
)
1682+
_create_php_bci(OsVersion.SP5, variant, 8)
1683+
for variant in (PhpVariant.cli, PhpVariant.apache, PhpVariant.fpm)
16821684
]
16831685

16841686

@@ -1725,7 +1727,7 @@ def _create_php_bci(
17251727
CMD /usr/lib/dirsrv/dscontainer -H
17261728
""",
17271729
)
1728-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
1730+
for os_version in ALL_NONBASE_OS_VERSIONS
17291731
]
17301732

17311733
_DISABLE_GETTY_AT_TTY1_SERVICE = "systemctl disable getty@tty1.service"
@@ -1755,7 +1757,7 @@ def _create_php_bci(
17551757
"""
17561758
),
17571759
)
1758-
for os_version in ALL_OS_VERSIONS
1760+
for os_version in ALL_BASE_OS_VERSIONS
17591761
]
17601762

17611763

@@ -1808,7 +1810,7 @@ def _create_php_bci(
18081810
{DOCKERFILE_RUN} mkdir /run/mysql
18091811
""",
18101812
)
1811-
for os_version in ALL_OS_VERSIONS
1813+
for os_version in ALL_NONBASE_OS_VERSIONS
18121814
]
18131815

18141816

@@ -1832,7 +1834,7 @@ def _create_php_bci(
18321834
build_recipe_type=BuildType.DOCKER,
18331835
cmd=["mariadb"],
18341836
)
1835-
for os_version in ALL_OS_VERSIONS
1837+
for os_version in ALL_NONBASE_OS_VERSIONS
18361838
]
18371839

18381840

@@ -1867,7 +1869,7 @@ def _create_php_bci(
18671869
{DOCKERFILE_RUN} chmod +x /usr/local/bin/entrypoint.sh
18681870
""",
18691871
)
1870-
for os_version in ALL_OS_VERSIONS
1872+
for os_version in ALL_NONBASE_OS_VERSIONS
18711873
]
18721874

18731875

@@ -1929,9 +1931,7 @@ def _create_php_bci(
19291931
CMD pg_isready -U ${{POSTGRES_USER:-postgres}} -h localhost -p 5432
19301932
""",
19311933
)
1932-
for ver, os_version in list(
1933-
product([15, 14], [OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED])
1934-
)
1934+
for ver, os_version in list(product([15, 14], ALL_NONBASE_OS_VERSIONS))
19351935
+ [(pg_ver, OsVersion.TUMBLEWEED) for pg_ver in (13, 12)]
19361936
]
19371937

@@ -1957,7 +1957,7 @@ def _create_php_bci(
19571957
volumes=["/var/lib/prometheus"],
19581958
exposes_tcp=[9090],
19591959
)
1960-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
1960+
for os_version in ALL_NONBASE_OS_VERSIONS
19611961
]
19621962

19631963
ALERTMANAGER_PACKAGE_NAME = "golang-github-prometheus-alertmanager"
@@ -1982,7 +1982,7 @@ def _create_php_bci(
19821982
volumes=["/var/lib/prometheus/alertmanager"],
19831983
exposes_tcp=[9093],
19841984
)
1985-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
1985+
for os_version in ALL_NONBASE_OS_VERSIONS
19861986
]
19871987

19881988
BLACKBOX_EXPORTER_PACKAGE_NAME = "prometheus-blackbox_exporter"
@@ -2006,7 +2006,7 @@ def _create_php_bci(
20062006
],
20072007
exposes_tcp=[9115],
20082008
)
2009-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
2009+
for os_version in ALL_NONBASE_OS_VERSIONS
20102010
]
20112011

20122012
GRAFANA_FILES = {}
@@ -2048,7 +2048,7 @@ def _create_php_bci(
20482048
{DOCKERFILE_RUN} chmod +x /run.sh
20492049
""",
20502050
)
2051-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
2051+
for os_version in ALL_NONBASE_OS_VERSIONS
20522052
]
20532053

20542054
_NGINX_FILES = {}
@@ -2106,7 +2106,7 @@ def _create_php_bci(
21062106
STOPSIGNAL SIGQUIT
21072107
""",
21082108
)
2109-
for os_version in ALL_OS_VERSIONS
2109+
for os_version in ALL_NONBASE_OS_VERSIONS
21102110
]
21112111

21122112

@@ -2178,7 +2178,7 @@ def _create_php_bci(
21782178
)
21792179
for rust_version, os_version in product(
21802180
_RUST_VERSIONS,
2181-
(OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED),
2181+
ALL_NONBASE_OS_VERSIONS,
21822182
)
21832183
]
21842184

@@ -2208,7 +2208,7 @@ def _create_php_bci(
22082208
config_sh_script="""
22092209
""",
22102210
)
2211-
for os_version in ALL_OS_VERSIONS
2211+
for os_version in ALL_BASE_OS_VERSIONS
22122212
]
22132213

22142214
MINIMAL_CONTAINERS = [
@@ -2234,7 +2234,7 @@ def _create_php_bci(
22342234
for name in ("grep", "diffutils", "info", "fillup", "libzio1")
22352235
],
22362236
)
2237-
for os_version in ALL_OS_VERSIONS
2237+
for os_version in ALL_BASE_OS_VERSIONS
22382238
]
22392239

22402240
BUSYBOX_CONTAINERS = [
@@ -2266,7 +2266,7 @@ def _create_php_bci(
22662266
),
22672267
config_sh_interpreter="/bin/sh",
22682268
)
2269-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
2269+
for os_version in ALL_BASE_OS_VERSIONS
22702270
]
22712271

22722272
_PCP_FILES = {}
@@ -2331,7 +2331,7 @@ def _create_php_bci(
23312331
CMD /usr/local/bin/healthcheck
23322332
""",
23332333
)
2334-
for os_version in ALL_OS_VERSIONS
2334+
for os_version in ALL_NONBASE_OS_VERSIONS
23352335
]
23362336

23372337
REGISTRY_CONTAINERS = [
@@ -2370,7 +2370,7 @@ def _create_php_bci(
23702370
exposes_tcp=[5000],
23712371
support_level=SupportLevel.L3,
23722372
)
2373-
for os_version in (OsVersion.SP4, OsVersion.SP5, OsVersion.TUMBLEWEED)
2373+
for os_version in ALL_NONBASE_OS_VERSIONS
23742374
]
23752375

23762376
ALL_CONTAINER_IMAGE_NAMES: Dict[str, BaseContainerImage] = {

src/dotnet/updater.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def _is_latest_dotnet(version: _DOTNET_VERSION_T, os_version: OsVersion) -> bool
327327

328328
DOTNET_IMAGES: list[DotNetBCI] = []
329329

330-
for os_version in (OsVersion.SP4, OsVersion.SP5):
330+
for os_version in (OsVersion.SP5,):
331331
for ver in _DOTNET_VERSIONS:
332332
package_list: list[Package | str] = [
333333
"dotnet-host",

tests/test_bot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import pytest
55
import yaml
6-
from bci_build.package import ALL_OS_VERSIONS
6+
from bci_build.package import ALL_NONBASE_OS_VERSIONS
77
from bci_build.package import OsVersion
88
from staging.bot import StagingBot
99

@@ -16,7 +16,7 @@ def run_in_tmp_path(tmp_path: pathlib.Path):
1616
os.chdir(cwd)
1717

1818

19-
@pytest.mark.parametrize("os_version", ALL_OS_VERSIONS)
19+
@pytest.mark.parametrize("os_version", ALL_NONBASE_OS_VERSIONS)
2020
@pytest.mark.parametrize("branch", ["", "something"])
2121
@pytest.mark.parametrize("packages", [None, ["pcp-image"]])
2222
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)