Skip to content

Commit

Permalink
bump version, shellcheck, cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
brokenpip3 committed May 12, 2024
1 parent 60e297d commit 1ecd21e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backup/pvc/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.2.5
v0.2.6
5 changes: 3 additions & 2 deletions backup/pvc/bin/get-latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions backup/pvc/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion chart/jenkins-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `""` | |
Expand Down
2 changes: 1 addition & 1 deletion chart/jenkins-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ecd21e

Please sign in to comment.