diff --git a/backup/pvc/VERSION.txt b/backup/pvc/VERSION.txt index b88fb90fb..400feeb94 100644 --- a/backup/pvc/VERSION.txt +++ b/backup/pvc/VERSION.txt @@ -1 +1 @@ -v0.2.5 +v0.2.6 diff --git a/backup/pvc/bin/get-latest.sh b/backup/pvc/bin/get-latest.sh index 09a804dc6..da8055f4e 100644 --- a/backup/pvc/bin/get-latest.sh +++ b/backup/pvc/bin/get-latest.sh @@ -5,7 +5,8 @@ set -eo pipefail is_backup_not_exist() { local backup_dir="$1" # Save the current value of 'set -e' - local previous_e=$(set +e; :; echo $?) + local previous_e + previous_e=$(set +e; :; echo $?) # Temporarily turn off 'set -e' set +e @@ -23,7 +24,7 @@ is_backup_not_exist() { [ $ls_exit_status -ne 0 ] } -[[ -z "${BACKUP_DIR}" ]] && echo "Required 'BACKUP_DIR' env not set" && exit 1 +[[ -z "${BACKUP_DIR}" ]] && { echo "Required 'BACKUP_DIR' env not set"; exit 1; } # Check if we have any backup if is_backup_not_exist "${BACKUP_DIR}"; then diff --git a/backup/pvc/bin/run.sh b/backup/pvc/bin/run.sh index 441902dd0..4b6052019 100644 --- a/backup/pvc/bin/run.sh +++ b/backup/pvc/bin/run.sh @@ -16,7 +16,8 @@ check_env_var() { is_backup_not_exist() { local backup_dir="$1" # Save the current value of 'set -e' - local previous_e=$(set +e; :; echo $?) + local previous_e + previous_e=$(set +e; :; echo $?) # Temporarily turn off 'set -e' set +e @@ -57,7 +58,7 @@ fi while true; do - sleep $BACKUP_CLEANUP_INTERVAL + sleep "$BACKUP_CLEANUP_INTERVAL" if [[ -n "${BACKUP_COUNT}" ]]; then exceeding_backups=$(find_exceeding_backups "${BACKUP_DIR}" "${BACKUP_COUNT}") if [[ -n "$exceeding_backups" ]]; then diff --git a/chart/jenkins-operator/README.md b/chart/jenkins-operator/README.md index 96e510919..c7e5ad847 100644 --- a/chart/jenkins-operator/README.md +++ b/chart/jenkins-operator/README.md @@ -30,7 +30,7 @@ Kubernetes native operator which fully manages Jenkins on Kubernetes | jenkins.backup.env[2].name | string | `"BACKUP_COUNT"` | | | jenkins.backup.env[2].value | string | `"3"` | | | jenkins.backup.getLatestAction[0] | string | `"/home/user/bin/get-latest.sh"` | | -| jenkins.backup.image | string | `"quay.io/jenkins-kubernetes-operator/backup-pvc:v0.2.6"` | | +| jenkins.backup.image | string | `"quay.io/jenkins-kubernetes-operator/backup-pvc:v0.2.7"` | | | jenkins.backup.interval | int | `30` | | | jenkins.backup.makeBackupBeforePodDeletion | bool | `true` | | | jenkins.backup.pvc.className | string | `""` | | diff --git a/chart/jenkins-operator/values.yaml b/chart/jenkins-operator/values.yaml index 388de22ec..236f6e800 100644 --- a/chart/jenkins-operator/values.yaml +++ b/chart/jenkins-operator/values.yaml @@ -210,7 +210,7 @@ jenkins: # image used by backup feature # By default using prebuilt backup PVC image - image: quay.io/jenkins-kubernetes-operator/backup-pvc:v0.2.6 + image: quay.io/jenkins-kubernetes-operator/backup-pvc:v0.2.7 # containerName is backup container name containerName: backup