Skip to content

Commit febf0d9

Browse files
committed
Remove rhel7, ubi7, and centos sentences, usage
and replace it with RHEL10. ubi7 image is replaced with ubi10 image. Sending analysis to logdetective. Exit code failure is turned-off. We do not need to break tests/builds Signed-off-by: Petr "Stone" Hracek <[email protected]>
1 parent 63d3676 commit febf0d9

File tree

6 files changed

+11
-23
lines changed

6 files changed

+11
-23
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ Names of the directories in which the Dockerfiles are contained. Needs to be def
8484
Dockerfile for the scripts to know which versions to build.
8585

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

9090
`SKIP_SQUASH`
9191
When set to 1 the build script will skip the squash phase of the build.
@@ -122,17 +122,17 @@ 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-rhel8` file exists, the `Dockerfile.rhel8` will not be expected
125+
For example, if `.exclude-rhel10` file exists, the `Dockerfile.rhel10` 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

129129
`.devel-repo-<OS>`
130130
This file is useful if we need to work with RPMs that are not available publically yet.
131131
Content of the file is not important at this point.
132132
If such a file exists in the repository, then the building scripts will take a look
133-
at a correspondent variable, e.g. DEVEL_REPO_rhel8, and will use the repository file
133+
at a correspondent variable, e.g. DEVEL_REPO_rhel10, and will use the repository file
134134
defined by that variable.
135-
That means that definition of the DEVEL_REPO_rhel8 variable is a responsibility of
135+
That means that definition of the DEVEL_REPO_rhel10 variable is a responsibility of
136136
the test/CI environment.
137137

138138
`.build-args-<OS>`

build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ parse_output ()
6767

6868
analyze_logs_by_logdetective() {
6969
# logdetective should not break the build functionality
70-
set +e
7170
local log_file_name="$1"
7271
echo "Sending failed log by fpaste command to paste bin."
7372
paste_bin_link=$(fpaste "$log_file_name")
@@ -87,10 +86,8 @@ analyze_logs_by_logdetective() {
8786
echo "ERROR: Failed to analyze log file by logdetective server."
8887
cat "${logdetective_build_file}"
8988
echo "-------- LOGDETECTIVE BUILD LOG ANALYSIS FAILED --------"
90-
set -e
9189
return
9290
fi
93-
set -e
9491
jq -rC '.explanation.text' < "${logdetective_build_file}"
9592
# This part of code is from https://github.com/teemtee/tmt/blob/main/tmt/steps/scripts/tmt-file-submit
9693
if [ -z "$TMT_TEST_PIDFILE" ]; then
@@ -247,8 +244,10 @@ function docker_build_with_version {
247244
else
248245
if [[ "${OS}" == "rhel8" ]] || [[ "${OS}" == "rhel9" ]] || [[ "${OS}" == "rhel10" ]]; then
249246
# Do not fail in case of sending log to pastebin or logdetective fails.
247+
set +e
250248
echo "Analyse logs by logdetective, why it failed."
251249
analyze_logs_by_logdetective "${tmp_file}"
250+
set -e
252251
fi
253252
exit 1
254253
fi

generator.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ def get_version_distro_mapping(
5050
5151
[{"distro": "rhel-8-x86_64.yaml", "version": "3.9"},
5252
{"distro": "rhel-8-x86_64.yaml", "version": "3.8"},
53-
{"distro": "centos-7-x86_64.yaml", "version": "3.8"},
5453
{"distro": "centos-stream-9-x86_64.yaml", "version": "3.9"}]
5554
5655
and transfer them to:
5756
58-
{"3.8": ["rhel-8-x86_64.yaml", "centos-7-x86_64.yaml"],
57+
{"3.8": ["rhel-8-x86_64.yaml", "centos-stream-10-x86_64.yaml"],
5958
"3.9": ["rhel-8-x86_64.yaml", "centos-stream-9-x86_64.yaml"]}
6059
"""
6160
multispec_yaml = yaml.load(multispec_file.read(), Loader=yaml.SafeLoader)
@@ -74,7 +73,6 @@ def filename_to_distro_config(
7473
This is usually needed only for dockerfiles.
7574
- Dockerfile.rhelXX → rhel-XX-x86_64.yaml
7675
- Dockerfile.cXXs → centos-stream-XX-x86_64.yaml
77-
- Dockerfile.centosX → centos-X-x86_64.yaml
7876
- Dockerfile.fedora → the newest fedora-XX-x86_64.yaml
7977
8078
If not found, empty string is returned indicating that the
@@ -83,14 +81,11 @@ def filename_to_distro_config(
8381
"""
8482
rhel_match = re.match(r".*\.rhel(\d+)$", filename)
8583
centos_stream_match = re.match(r".*\.c(\d+)s$", filename)
86-
centos_match = re.match(r".*\.centos(\d+)$", filename)
8784

8885
if rhel_match:
8986
config = f"rhel-{rhel_match.group(1)}-x86_64.yaml"
9087
elif centos_stream_match:
9188
config = f"centos-stream-{centos_stream_match.group(1)}-x86_64.yaml"
92-
elif centos_match:
93-
config = f"centos-{centos_match.group(1)}-x86_64.yaml"
9489
elif filename.endswith(".fedora"):
9590
sorted_configs = sorted(c for c in mapping[version] if c.startswith("fedora"))
9691
if len(sorted_configs) > 1:
@@ -103,7 +98,7 @@ def filename_to_distro_config(
10398
config = ""
10499
else:
105100
raise RuntimeError(
106-
f"File {filename} does not match any of the known suffixes: .rhelXX, .cXs, .centosX or .fedora"
101+
f"File {filename} does not match any of the known suffixes: .rhelXX, .cXs, or .fedora"
107102
)
108103

109104
return config
@@ -163,10 +158,6 @@ def main() -> None:
163158
elif section == "SYMLINK_RULES":
164159
print(f"LN\t{spec['src']}{spec['dest']}")
165160
symlink(spec["src"], spec["dest"])
166-
# Remove dead symlinks
167-
# This is needed for backward-compatible symlink Dockerfile → Dockerfile.centos7
168-
# because we want to delete it when Dockerfile.centos7 does not exist.
169-
# When we drop Centos 7, we can stop doing this.
170161
# In the meantime, if you need to create a dead symlink on purpose,
171162
# use check_symlink: false in manifest.yml config file.
172163
# It's easier to remove dead symlinks than checking

shared-scripts/core/opt/app-root/etc/scl_enable

Lines changed: 0 additions & 2 deletions
This file was deleted.

shared-scripts/core/usr/bin/prepare-yum-repositories

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -ex
1717
# but might be used if we need to change this behaviour.
1818
# Once we realize there are real use cases for using those variables, we should
1919
# document them properly.
20-
DEFAULT_REPOS=${DEFAULT_REPOS:-"rhel-7-server-rpms rhel-7-server-optional-rpms"}
20+
DEFAULT_REPOS=${DEFAULT_REPOS:-"rhel-10-server-baseos-rpms rhel-10-server-appstream-rpms"}
2121
SKIP_REPOS_ENABLE=${SKIP_REPOS_ENABLE:-false}
2222
SKIP_REPOS_DISABLE=${SKIP_REPOS_DISABLE:-false}
2323

test-lib-openshift.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ ct_os_test_response_internal() {
900900
local status
901901
local response_code
902902
local response_file
903-
local util_image_name='registry.access.redhat.com/ubi7/ubi'
903+
local util_image_name='registry.access.redhat.com/ubi10/ubi'
904904

905905
response_file=$(mktemp /tmp/ct_test_response_XXXXXX)
906906
ct_os_deploy_cmd_image "${util_image_name}"

0 commit comments

Comments
 (0)