mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Merge pull request #16622 from ixdy/upload-to-gcs-emptydir
Only try to upload test artifacts if they really exist
This commit is contained in:
commit
bc608deed6
@ -54,7 +54,7 @@ function upload_logs_to_gcs() {
|
|||||||
local -r gcs_acl="public-read"
|
local -r gcs_acl="public-read"
|
||||||
for upload_attempt in $(seq 3); do
|
for upload_attempt in $(seq 3); do
|
||||||
echo "Uploading to ${gcs_build_path} (attempt ${upload_attempt})"
|
echo "Uploading to ${gcs_build_path} (attempt ${upload_attempt})"
|
||||||
if [[ -d "${artifacts_path}" ]]; then
|
if [[ -d "${artifacts_path}" && -n $(ls -A "${artifacts_path}") ]]; then
|
||||||
gsutil -m -q -o "GSUtil:use_magicfile=True" cp -a "${gcs_acl}" -r -c \
|
gsutil -m -q -o "GSUtil:use_magicfile=True" cp -a "${gcs_acl}" -r -c \
|
||||||
-z log,txt,xml "${artifacts_path}" "${gcs_build_path}/artifacts" || continue
|
-z log,txt,xml "${artifacts_path}" "${gcs_build_path}/artifacts" || continue
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user