Skip to content

Commit

Permalink
Switch most containers over to tag_version
Browse files Browse the repository at this point in the history
Left out dotnet, kiwi based ones and those that have stable/oldstable as that
needs more work.
  • Loading branch information
dirkmueller committed Oct 10, 2024
1 parent e986980 commit cc51e71
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/bci_build/package/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _is_main_gcc(os_version: OsVersion, gcc_version: _GCC_VERSIONS) -> bool:
package_name=f"gcc-{gcc_version}-image",
os_version=os_version,
version="%%gcc_minor_version%%",
tag_version=gcc_version,
branch_version=gcc_version,
support_level=(
SupportLevel.L3 if not os_version.is_sle15 else SupportLevel.TECHPREVIEW
),
Expand Down
14 changes: 7 additions & 7 deletions src/bci_build/package/gcc/README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ The GNU Compiler Collections supports a wide range of frontends. The container
image ships the C and C++ frontends available as `gcc` and `g++`
respectively. The following additional frontends can be installed from the
repository:
- `gcc{{ image.tag_version }}-fortran` for Fortran support
{% if (image.tag_version == 7) or (image.os_version.is_tumbleweed) %}- `gcc{{ image.tag_version }}-ada` for the Ada frontend (GNAT)
{% endif %}{% if image.os_version.is_tumbleweed %}- `gcc{{ image.tag_version }}-go` for the Go frontend
- `gcc{{ image.tag_version }}-objc` and `gcc{{ image.tag_version }}-obj-c++` for the Objective C and Objective C++
{% if (image.tag_version >= 12) %}- `gcc{{ image.tag_version }}-d` for the frontend to the D Language
{% endif %}{%- if (image.tag_version >= 13) %}- `gcc{{ image.tag_version }}-m2` for the Modula 2 compiler frontend
{% endif %}{%- if (image.tag_version >= 14) %}- `gcc{{ image.tag_version }}-rust` for the GNU Rust compiler
- `gcc{{ image.branch_version }}-fortran` for Fortran support
{% if (image.branch_version == 7) or (image.os_version.is_tumbleweed) %}- `gcc{{ image.branch_version }}-ada` for the Ada frontend (GNAT)
{% endif %}{% if image.os_version.is_tumbleweed %}- `gcc{{ image.branch_version }}-go` for the Go frontend
- `gcc{{ image.branch_version }}-objc` and `gcc{{ image.branch_version }}-obj-c++` for the Objective C and Objective C++
{% if (image.branch_version >= 12) %}- `gcc{{ image.branch_version }}-d` for the frontend to the D Language
{% endif %}{%- if (image.branch_version >= 13) %}- `gcc{{ image.branch_version }}-m2` for the Modula 2 compiler frontend
{% endif %}{%- if (image.branch_version >= 14) %}- `gcc{{ image.branch_version }}-rust` for the GNU Rust compiler
{% endif %}{% endif %}

### Using the container image interactively
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/kiwi.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# kiwi is not L3 supported
# support_level=SupportLevel.L3,
version=(kiwi_ver := get_pkg_version("python-kiwi", os_version)),
tag_version=format_version(kiwi_ver, ParseVersion.MAJOR),
branch_version=format_version(kiwi_ver, ParseVersion.MAJOR),
version_in_uid=False,
additional_versions=[
(kiwi_minor := format_version(kiwi_ver, ParseVersion.MINOR)),
Expand Down
4 changes: 2 additions & 2 deletions src/bci_build/package/mariadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
ApplicationStackContainer(
name=f"{prefix}mariadb",
version=_MARIADB_VERSION_PLACEHOLDER,
tag_version=mariadb_version,
branch_version=mariadb_version,
additional_names=additional_names,
os_version=os_version,
is_latest=os_version in CAN_BE_LATEST_OS_VERSION,
Expand Down Expand Up @@ -150,7 +150,7 @@
version_in_uid=False,
additional_names=[f"{name}-client" for name in additional_names],
version=_MARIADB_VERSION_PLACEHOLDER,
tag_version=mariadb_version,
branch_version=mariadb_version,
pretty_name="MariaDB Client",
support_level=SupportLevel.L3,
package_list=["mariadb-client"],
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _get_node_kwargs(ver: _NODE_VERSIONS, os_version: OsVersion):
"pretty_name": f"Node.js {ver} development",
"additional_names": ["node"],
"version": node_version_replacement,
"tag_version": str(ver),
"branch_version": str(ver),
"additional_versions": [node_version_replacement],
"package_list": [
f"nodejs{ver}",
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/openjdk-devel/README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ COPY . ./
RUN javac Hello.java

# Bundle the application into OpenJDK runtime image
FROM {{ image.registry }}/{{ image.registry_prefix }}/openjdk:{{ image.tag_version }}
FROM {{ image.registry }}/{{ image.registry_prefix }}/openjdk:{{ image.branch_version }}

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/openjdk/README.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To compile and deploy an application, copy the sources and build the application

```Dockerfile
# Build the application using the OpenJDK development image
FROM {{ image.registry }}/{{ image.registry_prefix }}/openjdk-devel:{{ image.tag_version }} as build
FROM {{ image.registry }}/{{ image.registry_prefix }}/openjdk-devel:{{ image.branch_version }} as build

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/php-apache/README.md.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The PHP Apache {{ image.tag_version }} container image
# The PHP Apache {{ image.branch_version }} container image

{% include 'badges.j2' %}

Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/php-fpm/README.md.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The PHP FPM {{ image.tag_version }} container image
# The PHP FPM {{ image.branch_version }} container image

{% include 'badges.j2' %}

Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/php.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _create_php_bci(
name=str(php_variant).lower(),
no_recommends=False,
version="%%php_version%%",
tag_version=php_version,
branch_version=php_version,
additional_versions=["%%php_version%%"],
pretty_name=f"{str(php_variant)} {php_version}",
package_name=f"{str(php_variant).lower()}{php_version}-image",
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/php/README.md.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The PHP {{ image.tag_version }} container image
# The PHP {{ image.branch_version }} container image

{% include 'badges.j2' %}

Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
support_level=SupportLevel.ACC,
package_list=["libpq5", f"postgresql{ver}-server", "findutils"],
version="%%pg_patch_version%%",
tag_version=ver,
branch_version=ver,
additional_versions=["%%pg_minor_version%%", "%%pg_patch_version%%"],
entrypoint=["/usr/local/bin/docker-entrypoint.sh"],
cmd=["postgres"],
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def _get_python_kwargs(py3_ver: _PYTHON_VERSIONS, os_version: OsVersion):
"name": "python",
"pretty_name": f"Python {py3_ver} development",
"version": py3_ver_replacement,
"tag_version": py3_ver,
"branch_version": py3_ver,
"additional_versions": ["3", py3_ver_replacement],
"env": {
"PYTHON_VERSION": py3_ver_replacement,
Expand Down
2 changes: 1 addition & 1 deletion src/bci_build/package/spack.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
is_latest=os_version in CAN_BE_LATEST_OS_VERSION,
logo_url="https://spack.io/assets/images/spack-logo-white.svg",
version=(spack_pkg_version := get_pkg_version("spack", os_version)),
tag_version=format_version(spack_pkg_version, ParseVersion.MINOR),
branch_version=format_version(spack_pkg_version, ParseVersion.MINOR),
additional_versions=[spack_pkg_version],
version_in_uid=False,
package_list=[
Expand Down
4 changes: 2 additions & 2 deletions src/bci_build/package/templates/php_common.j2
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## How to install PHP extensions

PHP extensions must be installed using the `zypper` package manager. PHP
extensions are named using the `php{{ image.tag_version }}-$extension_name` scheme,
extensions are named using the `php{{ image.branch_version }}-$extension_name` scheme,
and they can be installed as follows:

```Dockerfile
FROM {{ image.pretty_reference }}

RUN zypper -n in php{{ image.tag_version }}-gd php{{ image.tag_version }}-intl
RUN zypper -n in php{{ image.branch_version }}-gd php{{ image.branch_version }}-intl
```

Alternatively, you can use the `docker-php-ext-install` script. It is provided
Expand Down

0 comments on commit cc51e71

Please sign in to comment.