From: Fabiano Rosas <faro...@suse.de> 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 <stefa...@redhat.com> Reviewed-by: Peter Xu <pet...@redhat.com> Signed-off-by: Fabiano Rosas <faro...@suse.de> Link: https://lore.kernel.org/r/20250513133353.23022-3-faro...@suse.de Signed-off-by: Peter Xu <pet...@redhat.com> --- .gitlab-ci.d/buildtest.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index fbad34138c..b4e39fd7c1 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -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. -- 2.49.0