ci: Fix build-previous-qemu when the version tag is absent
Stefan reports that during QEMU release, pushing a series with the VERSION bump commit, but not pushing the new git tag in the same command will cause a failure of the build-previous-qemu job at the git fetch step. Since the job is intended to produce a build of the previous QEMU version for consumption by the migration-compat-* jobs, there's no reason to produce a build of the release commit because the migration job would end up testing the release against itself. Skip the job when VERSION contains the newly release version number. I'm opting for 'exit 0' for both the build and the test jobs because allow_failure would mask any real error in the jobs. It also avoids having an orange ! on every release pipeline. Reported-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20250513133353.23022-3-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
e74598a981
commit
d5845228b4
1 changed files with 8 additions and 0 deletions
|
|
@ -203,6 +203,11 @@ build-previous-qemu:
|
|||
GIT_FETCH_EXTRA_FLAGS: --prune --quiet
|
||||
before_script:
|
||||
- source scripts/ci/gitlab-ci-section
|
||||
# Skip if this series contains the release bump commit. During the
|
||||
# release process there might be a window of commits when the
|
||||
# version tag is not yet present in the remote and git fetch would
|
||||
# fail.
|
||||
- if grep -q "\.0$" VERSION; then exit 0; fi
|
||||
- export QEMU_PREV_VERSION="$(sed 's/\([0-9.]*\)\.[0-9]*/v\1.0/' VERSION)"
|
||||
- git remote add upstream https://gitlab.com/qemu-project/qemu
|
||||
- git fetch upstream refs/tags/$QEMU_PREV_VERSION:refs/tags/$QEMU_PREV_VERSION
|
||||
|
|
@ -223,6 +228,9 @@ build-previous-qemu:
|
|||
IMAGE: opensuse-leap
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
script:
|
||||
# Skip for round release numbers, this job is only relevant for
|
||||
# testing a development tree.
|
||||
- if grep -q "\.0$" VERSION; then exit 0; fi
|
||||
# Use the migration-tests from the older QEMU tree. This avoids
|
||||
# testing an old QEMU against new features/tests that it is not
|
||||
# compatible with.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue