taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

aptly-publish.sh (1049B)


      1 #!/bin/bash
      2 
      3 set -exou pipefail
      4 
      5 REPOROOT="${HOME}"/.aptly/public
      6 PUBLISHPATH="${HOME}"/public_nightly_repo
      7 DATESTAMP=$(date -Iseconds)
      8 
      9 ###
     10 ### House Keeping
     11 ###
     12 # Move any packages older than 30 days to the archive
     13 mkdir -p "${HOME}"/archive
     14 mv $(find "${HOME}"/incoming/trixie-taler-ci/ -mindepth 1 -mtime +30 | xargs echo) "${HOME}"/archive/ || true
     15 
     16 rm -rf "${HOME}"/garbagecollect
     17 mv "${REPOROOT}"/pool "${HOME}"/garbagecollect || true
     18 aptly repo drop --force taler-ci-snapshots || true
     19 aptly db cleanup
     20 
     21 
     22 ###
     23 ### Publishing
     24 ###
     25 aptly repo create -distribution=trixie -component=main taler-ci-snapshots
     26 aptly repo add taler-ci-snapshots /home/aptbuilder/incoming/trixie-taler-ci || true
     27 aptly snapshot create "taler-${DATESTAMP}" from repo taler-ci-snapshots
     28 aptly -gpg-provider="gpg2" publish -architectures="amd64,arm64" switch trixie "taler-${DATESTAMP}"
     29 rsync -avP --delete-before "${REPOROOT}"/ "${PUBLISHPATH}"/
     30 
     31 # Publish a list of all packages in the repo
     32 aptly repo show -with-packages taler-ci-snapshots > "${REPOROOT}"/packages.txt