From ccbe4066374e237a05e4c9722e73f9356bc6a2d6 Mon Sep 17 00:00:00 2001
From: Chase Qi <chase.qi@linaro.org>
Date: Tue, 22 Feb 2022 11:27:34 +0800
Subject: [PATCH] ci: publish ovmf.qcow2 for qemu test jobs

Signed-off-by: Chase Qi <chase.qi@linaro.org>
---
 .oniro-ci/build-generic.yaml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.oniro-ci/build-generic.yaml b/.oniro-ci/build-generic.yaml
index 80731470..13249dc3 100644
--- a/.oniro-ci/build-generic.yaml
+++ b/.oniro-ci/build-generic.yaml
@@ -279,11 +279,11 @@
   extends: .build-image
   script:
     - !reference [.build-image, script]
-    # Remove everything _except_ for the .wic.* and *.bmap files. Most of the
-    # remaining files are redundant and quite large. Our Linux builds really
-    # only care about the wic files.
+    # Remove everything _except_ for the .wic.* and *.bmap and ovmf.qcow2 files.
+    # Most of the remaining files are redundant and quite large. Our Linux
+    # builds really only care about the wic files and the qemu UEFI firmware.
     - echo "Removing non-wic/bmap image files"
-    - find "$CI_PROJECT_DIR"/artifacts/images/ \( -type f -o -type l \) -a ! -name "*.wic.*" -print -delete
+    - find "$CI_PROJECT_DIR"/artifacts/images/ \( -type f -o -type l \) -a ! \( -name "*.wic.*" -o -name "ovmf.qcow2" \) -print -delete
     - echo "Pruning empty directories"
     - find "$CI_PROJECT_DIR"/artifacts/ -type d -exec rmdir --verbose --ignore-fail-on-non-empty {} \; 2>/dev/null || true
 
-- 
GitLab