[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: aptly: add garbage-collection
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: aptly: add garbage-collection script |
Date: |
Tue, 26 Nov 2024 23:34:37 +0100 |
This is an automated email from the git hooks/post-receive script.
devan-carpenter pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new e277347 aptly: add garbage-collection script
e277347 is described below
commit e2773476d3be4cf1877d2a47b965fe4cfcade680
Author: Devan Carpenter <devan@taler.net>
AuthorDate: Tue Nov 26 23:34:12 2024 +0100
aptly: add garbage-collection script
---
aptly/aptly-garbage-collect.sh | 14 ++++++++++++++
aptly/aptly-publish.sh | 4 ----
aptly/entr.sh | 2 +-
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/aptly/aptly-garbage-collect.sh b/aptly/aptly-garbage-collect.sh
new file mode 100755
index 0000000..517ba07
--- /dev/null
+++ b/aptly/aptly-garbage-collect.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+set -exou pipefail
+
+REPOROOT="${HOME}"/.aptly/public
+DATESTAMP=$(date -Iseconds)
+
+# move any packages older than 30 days to the archive
+mv $(find "${HOME}"/incoming/bookworm-taler-ci/ -mindepth 1 -mtime +30 | xargs
echo) archive/
+
+rm -rf "${HOME}"/garbagecollect
+mv "${REPOROOT}"/pool "${HOME}"/garbagecollect || true
+aptly repo drop --force taler-ci-snapshots || true
+aptly db cleanup
diff --git a/aptly/aptly-publish.sh b/aptly/aptly-publish.sh
index 07a986f..2f6c64b 100755
--- a/aptly/aptly-publish.sh
+++ b/aptly/aptly-publish.sh
@@ -5,10 +5,6 @@ set -exou pipefail
REPOROOT="${HOME}"/.aptly/public
DATESTAMP=$(date -Iseconds)
-rm -rf "${HOME}"/garbagecollect
-mv "${REPOROOT}"/pool "${HOME}"/garbagecollect || true
-aptly repo drop --force taler-ci-snapshots || true
-aptly db cleanup
aptly repo create -distribution=bookworm -component=main taler-ci-snapshots
aptly repo add taler-ci-snapshots /home/aptbuilder/incoming/bookworm-taler-ci
|| true
aptly snapshot create "taler-${DATESTAMP}" from repo taler-ci-snapshots
diff --git a/aptly/entr.sh b/aptly/entr.sh
index 6837508..b7c5f9f 100755
--- a/aptly/entr.sh
+++ b/aptly/entr.sh
@@ -2,5 +2,5 @@
set -xo
while true ; do
- echo "${HOME}/incoming/bookworm-taler-ci" | entr -n -d
"${HOME}"/deployment/aptly/aptly-publish.sh ; sleep 1 || true
+ echo "${HOME}/incoming/bookworm-taler-ci" | entr -n -d
"${HOME}/deployment/aptly/aptly-garbage-collect.sh &&
${HOME}/deployment/aptly/aptly-publish.sh" ; sleep 1 || true
done
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: aptly: add garbage-collection script,
gnunet <=