From 08b7375877f7f9a371a94f7ec71abc449287eb67 Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Sun, 4 Jun 2023 12:41:16 +0200 Subject: [PATCH 1/3] attempt to move restore before seed job creation --- pkg/configuration/user/reconcile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/configuration/user/reconcile.go b/pkg/configuration/user/reconcile.go index d5671e2a9..303a54cf0 100644 --- a/pkg/configuration/user/reconcile.go +++ b/pkg/configuration/user/reconcile.go @@ -56,6 +56,10 @@ func (r *reconcileUserConfiguration) ReconcileCasc() (reconcile.Result, error) { func (r *reconcileUserConfiguration) ReconcileOthers() (reconcile.Result, error) { backupAndRestore := backuprestore.New(r.Configuration, r.logger) + if err := backupAndRestore.Restore(r.jenkinsClient); err != nil { + return reconcile.Result{}, err + } + result, err := r.ensureSeedJobs() if err != nil { return reconcile.Result{}, err @@ -64,10 +68,6 @@ func (r *reconcileUserConfiguration) ReconcileOthers() (reconcile.Result, error) return result, nil } - if err := backupAndRestore.Restore(r.jenkinsClient); err != nil { - return reconcile.Result{}, err - } - if err := backupAndRestore.Backup(false); err != nil { return reconcile.Result{}, err } From 50e1c263243ac6618ee1854acb6970f24c9a6fcc Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Mon, 5 Jun 2023 22:59:33 +0200 Subject: [PATCH 2/3] fix: trimming only zstd --- backup/pvc/bin/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup/pvc/bin/run.sh b/backup/pvc/bin/run.sh index 56c2d6875..50123d5e2 100644 --- a/backup/pvc/bin/run.sh +++ b/backup/pvc/bin/run.sh @@ -11,6 +11,6 @@ do if [[ ! -z "${BACKUP_COUNT}" ]]; then echo "Trimming to only ${BACKUP_COUNT} recent backups in preparation for new backup" #TODO: add the list of exceeding backup before delete - find ${BACKUP_DIR} -maxdepth 1 -name '*.tar.*' -exec basename {} \; | sort -gr | tail -n +$((BACKUP_COUNT +1)) | xargs -I '{}' rm ${BACKUP_DIR}/'{}' + find ${BACKUP_DIR} -maxdepth 1 -name '*.tar.zstd' -exec basename {} \; | sort -gr | tail -n +$((BACKUP_COUNT +1)) | xargs -I '{}' rm ${BACKUP_DIR}/'{}' fi done From 2dcf82440a854c84571712b06145cb583e963f7c Mon Sep 17 00:00:00 2001 From: brokenpip3 Date: Mon, 5 Jun 2023 23:14:58 +0200 Subject: [PATCH 3/3] fix: bump hugo and backup version, remove seabump binary before docker build --- .github/workflows/release-backup.yaml | 1 + Makefile | 2 +- backup/pvc/VERSION.txt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-backup.yaml b/.github/workflows/release-backup.yaml index 97461c93a..9fa610cb2 100644 --- a/.github/workflows/release-backup.yaml +++ b/.github/workflows/release-backup.yaml @@ -54,5 +54,6 @@ jobs: if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' run: | git reset --hard + rm bin/sembump make -C backup/pvc docker-build make -C backup/pvc docker-release diff --git a/Makefile b/Makefile index a3e8f279f..744d10c0a 100644 --- a/Makefile +++ b/Makefile @@ -478,7 +478,7 @@ helm-release-latest: helm # Download and build hugo extended locally if necessary HUGO_PATH = $(shell pwd)/bin/hugo -HUGO_VERSION = v0.62.2 +HUGO_VERSION = v0.113.0 HAS_HUGO := $(shell $(HUGO_PATH)/hugo version 2>&- | grep $(HUGO_VERSION)) hugo: ifeq ($(HAS_HUGO), ) diff --git a/backup/pvc/VERSION.txt b/backup/pvc/VERSION.txt index f0cfd3bb6..f82e0685d 100644 --- a/backup/pvc/VERSION.txt +++ b/backup/pvc/VERSION.txt @@ -1 +1 @@ -v0.2.2 +v0.2.4