mirror of
https://github.com/jenkinsci/kubernetes-operator.git
synced 2026-10-04 15:11:10 +02:00
fix(backup): get-latest.sh, search for both .gz and .zstd (#858)
This commit is contained in:
@@ -18,4 +18,4 @@ jobs:
|
||||
with:
|
||||
check_filenames: true
|
||||
ignore_words_list: aks,ags,startin
|
||||
skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*"
|
||||
skip: "*.js,package-lock.json,*.lock,*/Font-Awesome/*,*.toml,*.svg,*assets/vendor/bootstrap*,cert-manager.crds.yaml"
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
set -eo pipefail
|
||||
|
||||
[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1
|
||||
|
||||
latest=$(find ${BACKUP_DIR} -name '*.tar.zstd' -exec basename {} \; | sort -g | tail -n 1)
|
||||
# Search for all the tar.* inside the backup dir to support the migration between gzip vs zstd
|
||||
latest=$(find ${BACKUP_DIR} -name '*.tar.*' -exec basename {} \; | sort -g | tail -n 1)
|
||||
|
||||
if [[ "${latest}" == "" ]]; then
|
||||
echo "-1"
|
||||
|
||||
Reference in New Issue
Block a user