Skip to content

Commit 461087e

Browse files
FilipNikolovskijohnbieren
authored andcommitted
test(RELEASE-2308): mult-arch scenario for push-rpms-to-pulp e2e
For the e2e test, now we build RPMs for all four architectures (x86_64, aarch64, s390x, ppc64le) instead of just x86_64. Assisted-by: Claude Code Signed-off-by: Filip Nikolovski <fnikolov@redhat.com>
1 parent 267cd54 commit 461087e

5 files changed

Lines changed: 56 additions & 39 deletions

File tree

integration-tests/push-rpms-to-pulp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# push-rpms-to-pulp Test
22

3-
This test validates the pushing of rpms to pulp pipeline. When the release includes noarch RPMs, the integration test asserts they are published to all default arch repos (x86_64, aarch64, s390x, ppc64le). Task-level test `tasks/managed/push-rpms-to-pulp/tests/test-push-rpms-to-pulp-noarch-all-default-arches.yaml` covers the same noarch fanout behavior in isolation.
3+
This test validates the pushing of rpms to pulp pipeline. It builds binary RPMs for all supported architectures (x86_64, aarch64, s390x, ppc64le) plus a source RPM, and verifies each is pushed to its matching Pulp repository. It also validates noarch RPM fanout to all default arch repos. Task-level test `tasks/managed/push-rpms-to-pulp/tests/test-push-rpms-to-pulp-noarch-all-default-arches.yaml` covers noarch fanout behavior in isolation.
44

55
## Test-Specific Dependencies
66

integration-tests/push-rpms-to-pulp/resources/managed/rpa.yaml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,32 @@ spec:
1616
domain: konflux-release-integration-tests
1717
secretName: pulp-credentials-${component_name}
1818
mapping:
19-
"rpm-repositories": [
20-
{
21-
"name": "rpm-x86_64",
22-
"arch": "x86_64",
23-
"repository_id": "rpm-x86_64",
24-
"repository_name": "x86_64",
25-
"distro": "testdistro"
26-
},
27-
{
28-
"name": "rpm-aarch64",
29-
"arch": "aarch64",
30-
"repository_id": "rpm-aarch64",
31-
"repository_name": "aarch64",
32-
"distro": "testdistro"
33-
},
34-
{
35-
"name": "rpm-source",
36-
"arch": "src",
37-
"repository_id": "rpm-source",
38-
"repository_name": "source",
39-
"distro": "testdistro"
40-
}
41-
]
19+
rpm-repositories:
20+
- name: rpm-x86_64
21+
arch: x86_64
22+
repository_id: rpm-x86_64
23+
repository_name: x86_64
24+
distro: testdistro
25+
- name: rpm-aarch64
26+
arch: aarch64
27+
repository_id: rpm-aarch64
28+
repository_name: aarch64
29+
distro: testdistro
30+
- name: rpm-s390x
31+
arch: s390x
32+
repository_id: rpm-s390x
33+
repository_name: s390x
34+
distro: testdistro
35+
- name: rpm-ppc64le
36+
arch: ppc64le
37+
repository_id: rpm-ppc64le
38+
repository_name: ppc64le
39+
distro: testdistro
40+
- name: rpm-source
41+
arch: src
42+
repository_id: rpm-source
43+
repository_name: source
44+
distro: testdistro
4245
components:
4346
- name: ${component_name}
4447
contentType: rpm

integration-tests/push-rpms-to-pulp/resources/tenant/templates/tekton/pull-request-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ spec:
3030
- name: target-branch
3131
value: "{{ target_branch }}"
3232
- name: build-architectures
33-
value: ["x86_64"]
33+
value: ["x86_64", "aarch64", "s390x", "ppc64le"]
3434
- name: build-platforms
35-
value: ["linux/amd64", "localhost"]
35+
value: ["linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le", "localhost"]
3636
pipelineRef:
3737
resolver: git
3838
params:

integration-tests/push-rpms-to-pulp/resources/tenant/templates/tekton/push-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ spec:
2828
- name: target-branch
2929
value: "{{ target_branch }}"
3030
- name: build-architectures
31-
value: ["x86_64"]
31+
value: ["x86_64", "aarch64", "s390x", "ppc64le"]
3232
- name: build-platforms
33-
value: ["linux/amd64", "localhost"]
33+
value: ["linux/amd64", "linux/arm64", "linux/s390x", "linux/ppc64le", "localhost"]
3434
pipelineRef:
3535
resolver: git
3636
params:

integration-tests/push-rpms-to-pulp/test.sh

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ verify_release_contents() {
7676
advisory_url=$(jq -r '.status.artifacts.advisory.url // ""' <<< "${release_json}")
7777
advisory_internal_url=$(jq -r '.status.artifacts.advisory.internal_url // ""' <<< "${release_json}")
7878

79-
# first 2 arches are specified in the pipelinerun templates, the last one is src.
80-
# When the release includes noarch RPMs, fanout adds extra rpmfiles (one per default arch).
81-
arches=("x86_64" "src")
79+
# All 4 binary arches are built by rpmbuild-pipeline, plus src.
80+
# Noarch RPMs (hello-data) are fanned out to all default arch repos, adding extra rpmfiles.
81+
arches=("x86_64" "aarch64" "s390x" "ppc64le" "src")
8282
echo "Checking RPM files count..."
8383
local rpmfiles=$(jq -c '.status.artifacts.rpmfiles // []' <<< "${release_json}")
8484
local rpmfiles_count=$(jq -r '. | length' <<< "${rpmfiles}")
@@ -98,6 +98,19 @@ verify_release_contents() {
9898
echo "🔴 rpmfiles for ${arch} was empty"
9999
failures=$((failures+1))
100100
fi
101+
local expected_repo="${arch}"
102+
if [ "${arch}" == "src" ]; then
103+
expected_repo="source"
104+
fi
105+
local expected_pulprepo="konflux-release-integration-tests/${expected_repo}"
106+
local actual_pulprepo
107+
actual_pulprepo=$(jq -r '.[]? | select(.arch == "'"${arch}"'") | .pulprepo // ""' <<< "${rpmfiles}")
108+
if [ "${actual_pulprepo}" == "${expected_pulprepo}" ]; then
109+
echo "✅️ pulprepo for ${arch}: ${actual_pulprepo}"
110+
else
111+
echo "🔴 pulprepo for ${arch} was '${actual_pulprepo}', expected '${expected_pulprepo}'"
112+
failures=$((failures+1))
113+
fi
101114
done
102115

103116
# When the release includes noarch RPMs, assert they are published to all default arch repos.
@@ -240,14 +253,15 @@ verify_release_contents() {
240253
failures=$((failures+1))
241254
fi
242255

243-
# Check for binary RPM entry with arch (e.g., "hello-2.12.1-xxx (x86_64)")
244-
# Use pattern that doesn't match the .src entry
245-
if echo "${description}" | grep -E "hello-[0-9].*\(.*x86_64" | grep -qv "\.src"; then
246-
echo "✅️ Found binary RPM entry with x86_64 arch in description"
247-
else
248-
echo "🔴 Missing binary RPM entry with x86_64 arch in description"
249-
failures=$((failures+1))
250-
fi
256+
# Check for binary RPM entries for all architectures
257+
for binary_arch in x86_64 aarch64 s390x ppc64le; do
258+
if echo "${description}" | grep -E "hello-[0-9].*\(.*${binary_arch}" | grep -qv "\.src"; then
259+
echo "✅️ Found binary RPM entry with ${binary_arch} arch in description"
260+
else
261+
echo "🔴 Missing binary RPM entry with ${binary_arch} arch in description"
262+
failures=$((failures+1))
263+
fi
264+
done
251265

252266
# Check for noarch RPM entry (e.g., "hello-data-2.12.1-xxx (noarch)")
253267
if echo "${description}" | grep -q "hello-data-.* (noarch)"; then

0 commit comments

Comments
 (0)