jenkins: leaf-build: Don't attempt to delete boot/recovery images if building GSI
Change-Id: I300a73f0513bf95a37d13461079a13651e23211d
diff --git a/jenkins/leaf-build.sh b/jenkins/leaf-build.sh
index c87bed1..f877951 100755
--- a/jenkins/leaf-build.sh
+++ b/jenkins/leaf-build.sh
@@ -105,7 +105,7 @@
[ "$TARGET_IS_GSI" ] && ALLOW_GSI_DEBUG_SEPOLICY="--allow_gsi_debug_sepolicy"
mkdir -p "/var/lib/jenkins/leaf/target-files/$RELEASE_DIR$JENKINS_DEVICE"
for JENKINS_FLAVOR in "${LEAF_FLAVORS[@]}"; do
- zip -d "out/$JENKINS_DEVICE-target_files-$JENKINS_FLAVOR-$BUILD_ID.zip" "BOOTABLE_IMAGES/*" "IMAGES/*boot.img" "IMAGES/recovery.img"
+ [ ! "$TARGET_IS_GSI" ] && zip -d "out/$JENKINS_DEVICE-target_files-$JENKINS_FLAVOR-$BUILD_ID.zip" "BOOTABLE_IMAGES/*" "IMAGES/*boot.img" "IMAGES/recovery.img"
"$OTATOOLS/sign_target_files_apks" -o -d "$KEY_DIR" \
$ALLOW_GSI_DEBUG_SEPOLICY \
--avb_vbmeta_key "$KEY_DIR/avb.pem" \