Skip to content

Commit 8470c6c

Browse files
authored
Add support for building, testing C10S in container-common-scripts (#378)
Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent f994db1 commit 8470c6c

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

.github/workflows/container-tests.yml

+11-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
container-to-test: ["postgresql-container", "nginx-container", "s2i-perl-container", "s2i-python-container", "s2i-base-container" ]
16-
os: ["fedora", "c9s", "rhel7", "rhel8", "rhel9"]
16+
os: ["fedora", "c9s", "rhel7", "rhel8", "rhel9", "c10s"]
1717

1818
if: |
1919
github.event.issue.pull_request
@@ -32,7 +32,7 @@ jobs:
3232
branch="master"
3333
tf_scope="private"
3434
tmt_repo="https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
35-
if [ "${{ matrix.os }}" == "fedora" ] || [ "${{ matrix.os }}" == "c9s" ]; then
35+
if [ "${{ matrix.os }}" == "fedora" ] || [ "${{ matrix.os }}" == "c9s" ] || [ "${{ matrix.os }}" == "c10s" ]; then
3636
api_key=${{ secrets.TF_PUBLIC_API_KEY }}
3737
branch="main"
3838
tf_scope="public"
@@ -42,9 +42,15 @@ jobs:
4242
context="Fedora"
4343
tmt_plan="fedora"
4444
else
45-
compose="CentOS-Stream-9"
46-
context="CentOS Stream 9"
47-
tmt_plan="c9s"
45+
if [ "${{ matrix.os }}" == "c9s" ]; then
46+
compose="CentOS-Stream-9"
47+
context="CentOS Stream 9"
48+
tmt_plan="c9s"
49+
else
50+
compose="CentOS-Stream-10"
51+
context="CentOS Stream 10"
52+
tmt_plan="c10s"
53+
fi
4854
fi
4955
else
5056
if [ "${{ matrix.os }}" == "rhel7" ]; then

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Dockerfile for the scripts to know which versions to build.
8585

8686
`OS`
8787
OS version you want to build the images for. Currently the scripts are able to build for
88-
centos (default), centos6, c9s, rhel7, rhel8, rhel9, and fedora.
88+
centos (default), c9s, c10s, rhel7, rhel8, rhel9, and fedora.
8989

9090
`SKIP_SQUASH`
9191
When set to 1 the build script will skip the squash phase of the build.
@@ -122,7 +122,7 @@ how scripts in this repo work:
122122

123123
`.exclude-<OS>`
124124
If this file exists, the tooling will not run the build and tests for the specific Dockerfile.
125-
For example, if `.exclude-rhel7` file exists, the `Dockerfile.rhel7` will not be expected
125+
For example, if `.exclude-rhel8` file exists, the `Dockerfile.rhel8` will not be expected
126126
in the same directory, build and tests will be skipped.
127127
Content of the file is not important at this point.
128128

build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This script is used to build the OpenShift Docker images.
44
#
5-
# OS - Specifies distribution - "rhel7", "rhel8", "rhel9", "centos7", "c9s" or "fedora"
5+
# OS - Specifies distribution - "rhel7", "rhel8", "rhel9", "centos7", "c9s", "c10s" or "fedora"
66
# VERSION - Specifies the image version - (must match with subdirectory in repo)
77
# SINGLE_VERSION - Specifies the image version - (must match with subdirectory in repo)
88
# VERSIONS - Must be set to a list with possible versions (subdirectories)

common.mk

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ else ifeq ($(TARGET),c9s)
5353
OS := c9s
5454
DOCKERFILE ?= Dockerfile.c9s
5555
REGISTRY := quay.io/
56+
else ifeq ($(TARGET),c10s)
57+
OS := c10s
58+
DOCKERFILE ?= Dockerfile.c10s
59+
REGISTRY := quay.io/
5660
else
5761
OS := centos7
5862
DOCKERFILE ?= Dockerfile

test-lib.sh

+2
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,8 @@ ct_get_public_image_name() {
816816
public_image_name=$registry/centos7/$base_image_name-${version//./}-centos7:centos7
817817
elif [ "$os" == "c9s" ]; then
818818
public_image_name=$registry/sclorg/$base_image_name-${version//./}-c9s
819+
elif [ "$os" == "c10s" ]; then
820+
public_image_name=$registry/sclorg/$base_image_name-${version//./}-c10s
819821
fi
820822

821823
echo "$public_image_name"

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ for dir in ${VERSIONS}; do
4040
# Kept also IMAGE_NAME as some tests might still use that.
4141
IMAGE_NAME="$(docker inspect -f "{{.Config.Labels.name}}" "$IMAGE_ID"):$IMAGE_VERSION"
4242
# shellcheck disable=SC2268
43-
if [ "${OS}" == "centos7" ] || [ "${OS}" == "c9s" ] || [ "${OS}" == "fedora" ]; then
43+
if [ "${OS}" == "centos7" ] || [ "${OS}" == "c9s" ] || [ "${OS}" == "c10s" ] || [ "${OS}" == "fedora" ]; then
4444
export IMAGE_NAME="$REGISTRY$IMAGE_NAME"
4545
else
4646
export IMAGE_NAME
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM quay.io/sclorg/s2i-core-c10s
2+
LABEL name=test-image

0 commit comments

Comments
 (0)