nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests |Archive

commit 0387cb8200ba4c6a44ec7fb9a2760c2dea0c1881
parent 56f74f96249eca39f6205c3c17bcf70d3a49e8e9
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 20 Oct 2024 16:33:28 +0200

feat(docker-git): add archives by tag

Diffstat:
Mdocker/docker-git/docker/example_post-receive.sh | 23+++++++++++++++++++++++
1 file changed, 23 insertions(+), 0 deletions(-)

diff --git a/docker/docker-git/docker/example_post-receive.sh b/docker/docker-git/docker/example_post-receive.sh @@ -76,4 +76,27 @@ TOKEN="" curl --max-time 5 -s \ "https://jenkins.in0rdr.ch/git/notifyCommit?token=$TOKEN&url=https://git.in0rdr.ch/$r" +# Create .tar.gz archives by tag +archivedir="${destdir}${d}" +mkdir -p "${archivedir}" +git tag -l | while read -r t; do + f="${archivedir}/${d}-$(echo "${t}" | tr '/' '_').tar.gz" + test -f "${f}" && continue + git archive \ + --format tar.gz \ + --prefix "${d}-${t}/" \ + -o "${f}" \ + -- \ + "${t}" +done + +# Create .tar.gz archive for master +f="${archivedir}/${d}-master.tar.gz" +git archive \ + --format tar.gz \ + --prefix "${d}-master/" \ + -o "${f}" \ + -- \ + "master" + echo "done"