Skip to content

Commit 24e1907

Browse files
committed
ci: fix concurrent createrepo
As createrepo cannot run concurrently, the pipeline failed sometimes, because uploads happend at the same time causing concurrent createrepo calls. Fix this by moving createrepo into another job that runs after the build job completed. Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
1 parent d63b0e7 commit 24e1907

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ jobs:
8383
source: engine-appliance/tmp.repos/RPMS/x86_64/*.rpm
8484
target: github-ci/ovirt-appliance-${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }}/${{ matrix.build-os }}
8585
cleanup: yes
86-
createrepo: yes
8786
# keep 4 last builds + repodata
8887
keep_files_count: 17
8988

@@ -98,12 +97,30 @@ jobs:
9897
run: |
9998
[[ -z "${{ github.event.inputs.keep_workdir }}" ]] && rm -rf $PWD/*
10099
100+
createrepo-matrix:
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
build-os: ['el9', 'el10']
105+
runs-on: ubuntu-latest
106+
needs:
107+
- build-matrix
108+
steps:
109+
- name: Create or update repository metadata
110+
uses: ovirt/ovirt-resources-upload-action@main
111+
with:
112+
username: ${{ secrets.SSH_USERNAME_FOR_RESOURCES_OVIRT_ORG }}
113+
key: ${{ secrets.SSH_KEY_FOR_RESOURCES_OVIRT_ORG }}
114+
known_hosts: ${{ secrets.KNOWN_HOSTS_FOR_RESOURCES_OVIRT_ORG }}
115+
target: github-ci/ovirt-appliance-${{ github.event.inputs.distro-variant == '' && 'copr' || github.event.inputs.distro-variant }}/${{ matrix.build-os }}
116+
createrepo: yes
101117

102118
close-build-issue-on-success:
103119
name: Report workflow success
104120
runs-on: ubuntu-latest
105121
needs:
106122
- build-matrix
123+
- createrepo-matrix
107124
steps:
108125
- name: Checkout
109126
uses: ovirt/checkout-action@main
@@ -123,9 +140,10 @@ jobs:
123140
open-build-issue-on-failure:
124141
name: Report workflow failure
125142
runs-on: ubuntu-latest
126-
if: ${{ always() && (needs.build-matrix.result=='failure') }}
143+
if: ${{ always() && ((needs.build-matrix.result=='failure') || (needs.createrepo-matrix.result=='failure')) }}
127144
needs:
128145
- build-matrix
146+
- createrepo-matrix
129147

130148
steps:
131149
- name: Checkout

0 commit comments

Comments
 (0)