6 NAME
=$
(basename "${0}")
7 LONGOPTS
="version:,isos:,release-branch:,matching-jenkins-images-build-id:"
8 OPTS
=$
(getopt
-o "" --longoptions $LONGOPTS -n "${NAME}" -- "$@")
10 while [ $# -gt 0 ]; do
24 --matching-jenkins-images-build-id)
26 MATCHING_JENKINS_IMAGES_BUILD_ID
="$1"
32 # shellcheck disable=SC2029
33 ssh misc.lizard mkdir
"tails-amd64-${VERSION:?}"
35 scp
"${ISOS:?}/tails-amd64-${VERSION:?}/tails-amd64-${VERSION:?}."{apt-sources,build-manifest,buildlog,packages,iso.sig,img.sig} \
36 "misc.lizard
:tails-amd64-
${VERSION:?}"
38 ssh misc.lizard gpg --import < "wiki
/src
/tails-signing.key
"
40 # shellcheck disable=SC2087
41 ssh misc.lizard << EOF
42 cd tails-amd64-${VERSION:?} && \
44 "https
://nightly.tails.boum.org
/build_Tails_ISO_
${RELEASE_BRANCH:?}/builds/${MATCHING_JENKINS_IMAGES_BUILD_ID:?}/archive/build-artifacts/tails-amd64-${VERSION:?}.iso
" \
45 "https
://nightly.tails.boum.org
/build_Tails_ISO_
${RELEASE_BRANCH:?}/builds/${MATCHING_JENKINS_IMAGES_BUILD_ID:?}/archive/build-artifacts/tails-amd64-${VERSION:?}.img
" && \
46 gpg --verify tails-amd64-${VERSION:?}.iso{.sig,} && \
47 gpg --verify tails-amd64-${VERSION:?}.img{.sig,}
50 # shellcheck disable=SC2087
51 ssh misc.lizard << EOF
52 ( [ -d isos ] || git clone gitolite@puppet-git.lizard:isos.git ) && \
55 git annex sync --no-content && \
56 git annex import ../tails-amd64-${VERSION:?} && \
57 rmdir ../tails-amd64-${VERSION:?} && \
58 git commit -m "Add Tails
${VERSION:?}" && \
59 git annex sync --no-content && \
60 git annex copy tails-amd64-${VERSION:?} --to origin && \
61 git annex drop tails-amd64-${VERSION:?} && \
62 git annex sync --no-content