Fix/git pages rentetin create tests (#46)
CI Main / Config load (push) Successful in 3m12s
CI Git-Pages Main / Config load (push) Successful in 3m4s
CI Main / Latest versio (push) Successful in 30s
CI Git-Pages Main / Latest version (push) Successful in 27s
ci-helm-build-push Helm push 0.1.9
unit-tests Bats test report
CI Main / Bats tests (push) Successful in 1m56s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 1m19s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 3m47s
ci-docker-build-push Docker push 0.2.34
CI Main / Build & Push Docker (push) Successful in 1m14s
gitops/gitea-ci-library/git-pages GitOps: git-pages 0.1.9
CI Git-Pages Main / GitOps (push) Successful in 3m37s
gitops/gitea-ci-library GitOps: 0.2.34
CI Main / GitOps (push) Successful in 40s
CI Main / Report Summary (push) Successful in 4s
CI Main / Move provider version tag (push) Successful in 12s
CI Git-Pages Main / Report Summary (push) Successful in 4s
CI Main / Config load (push) Successful in 3m12s
CI Git-Pages Main / Config load (push) Successful in 3m4s
CI Main / Latest versio (push) Successful in 30s
CI Git-Pages Main / Latest version (push) Successful in 27s
ci-helm-build-push Helm push 0.1.9
unit-tests Bats test report
CI Main / Bats tests (push) Successful in 1m56s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 1m19s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 3m47s
ci-docker-build-push Docker push 0.2.34
CI Main / Build & Push Docker (push) Successful in 1m14s
gitops/gitea-ci-library/git-pages GitOps: git-pages 0.1.9
CI Git-Pages Main / GitOps (push) Successful in 3m37s
gitops/gitea-ci-library GitOps: 0.2.34
CI Main / GitOps (push) Successful in 40s
CI Main / Report Summary (push) Successful in 4s
CI Main / Move provider version tag (push) Successful in 12s
CI Git-Pages Main / Report Summary (push) Successful in 4s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #46
This commit was merged in pull request #46.
This commit is contained in:
@@ -70,8 +70,15 @@ spec:
|
||||
set -euo pipefail
|
||||
echo "Retention sidecar: installing deps..."
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends curl jq python3 >/dev/null
|
||||
apt-get install -y --no-install-recommends curl jq git ca-certificates >/dev/null
|
||||
echo "Retention sidecar: ready"
|
||||
# Sleep until 01:00 so retention runs at night
|
||||
now_epoch=$(date +%s)
|
||||
target_epoch=$(date -d "today 01:00:00" +%s)
|
||||
[ "$target_epoch" -le "$now_epoch" ] && target_epoch=$((target_epoch + 86400))
|
||||
sleep_sec=$((target_epoch - now_epoch))
|
||||
echo "Retention sidecar: next run in $((sleep_sec / 3600))h (at 01:00)"
|
||||
sleep $sleep_sec
|
||||
while true; do
|
||||
/scripts/retention-cleanup.sh
|
||||
echo "Retention sidecar: next run in 24h"
|
||||
|
||||
@@ -8,6 +8,8 @@ metadata:
|
||||
data:
|
||||
retention.json: |
|
||||
{{- .Values.retention.rules | toJson | nindent 4 }}
|
||||
retention-lib.sh: |
|
||||
{{- .Files.Get "files/retention-lib.sh" | nindent 4 }}
|
||||
retention-cleanup.sh: |
|
||||
{{- .Files.Get "files/retention-cleanup.sh" | nindent 4 }}
|
||||
retention-run.sh: |
|
||||
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
- |
|
||||
set -euo pipefail
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends curl jq >/dev/null
|
||||
apt-get install -y --no-install-recommends curl jq git >/dev/null
|
||||
chmod +x /scripts/retention-run.sh /scripts/retention-cleanup.sh
|
||||
/scripts/retention-run.sh
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user