systemd/0358-ci-add-a-unique-identifier-to-each-GH-Actions-job.patch
Jan Macku ee560ada81 systemd-257-12
Resolves: RHEL-100553,RHEL-103354,RHEL-104555,RHEL-106260,RHEL-44419,RHEL-72701,RHEL-79976,RHEL-97625,RHEL-97762
2025-08-13 13:54:24 +02:00

76 lines
3.0 KiB
Diff

From 7b8223ba2881a2aae20ba3bdb540db57371583fe Mon Sep 17 00:00:00 2001
From: Frantisek Sumsal <fsumsal@redhat.com>
Date: Tue, 15 Apr 2025 12:37:54 +0200
Subject: [PATCH] ci: add a unique identifier to each GH Actions job
As the current identifier is not unique enough for our set of jobs.
rhel-only: ci
Related: RHEL-79976
---
.github/workflows/mkosi.yml | 6 +++++-
test/integration-test-wrapper.py | 5 ++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/mkosi.yml b/.github/workflows/mkosi.yml
index 02a8e82c6e..6ddfaf1a87 100644
--- a/.github/workflows/mkosi.yml
+++ b/.github/workflows/mkosi.yml
@@ -62,6 +62,7 @@ jobs:
relabel: yes
vm: 0
skip: TEST-21-DFUZZER
+ identifier: regular-nspawn
- distro: centos
release: "10"
sanitizers: ""
@@ -70,6 +71,7 @@ jobs:
relabel: yes
vm: 1
skip: "TEST-21-DFUZZER TEST-60-MOUNT-RATELIMIT"
+ identifier: regular-vm
- distro: centos
release: "10"
sanitizers: address,undefined
@@ -77,6 +79,7 @@ jobs:
cflags: "-Og"
relabel: yes
vm: 0
+ identifier: sanitizers
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -176,6 +179,7 @@ jobs:
env \
TEST_PREFER_QEMU=${{ matrix.vm }} \
TEST_SKIP="${{ matrix.skip }}" \
+ JOB_IDENTIFIER=${{ matrix.identifier }} \
meson test \
-C build \
--no-rebuild \
@@ -189,7 +193,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure() && (github.repository == 'systemd/systemd' || github.repository == 'redhat-plumbers/systemd-rhel10')
with:
- name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-failed-test-journals
+ name: ci-mkosi-${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.distro }}-${{ matrix.release }}-${{ matrix.identifier }}-failed-test-journals
path: |
build/test/journal/*.journal
build/meson-logs/*
diff --git a/test/integration-test-wrapper.py b/test/integration-test-wrapper.py
index 79348bbf62..3e0cbbb678 100755
--- a/test/integration-test-wrapper.py
+++ b/test/integration-test-wrapper.py
@@ -560,9 +560,8 @@ def main() -> None:
id = os.environ['GITHUB_RUN_ID']
workflow = os.environ['GITHUB_WORKFLOW']
iteration = os.environ['GITHUB_RUN_ATTEMPT']
- artifact = (
- f'ci-{workflow}-{id}-{iteration}-{summary.distribution}-{summary.release}-failed-test-journals'
- )
+ identifier = os.environ['JOB_IDENTIFIER']
+ artifact = f'ci-{workflow}-{id}-{iteration}-{summary.distribution}-{summary.release}-{identifier}-failed-test-journals' # noqa: E501
ops += [f'gh run download {id} --name {artifact} -D ci/{artifact}']
journal_file = Path(f'ci/{artifact}/test/journal/{name}.journal')