release-tarball: add var to use list from jenkins

Add a parameter that can be used to reproduce the failure locally with
the last list from jenkins, without having SSH set up to download the
list of existing tarballs.

Change-Id: I9af310c24aa65c21cc4bd365d3df7804cba02df7
This commit is contained in:
Oliver Smith 2023-02-08 12:31:32 +01:00
parent c23f21f31c
commit b769d12021
3 changed files with 8 additions and 1 deletions

View File

@ -69,6 +69,7 @@ RUN apt-get update && \
mscgen \
python3-nwdiag \
rsync \
wget \
xsltproc \
&& \
apt-get clean

View File

@ -10,6 +10,7 @@ docker run \
-v "$PWD:/build" \
-v "$(readlink -f $SSH_AUTH_SOCK)":/ssh-agent \
-w /osmo-ci \
-e EXISTING_TARBALLS_FROM_JENKINS="$EXISTING_TARBALLS_FROM_JENKINS" \
-e KEEP_TEMP="$KEEP_TEMP" \
-e SSH_AUTH_SOCK=/ssh-agent \
"$USER/release-tarball-build-dist" sh -e /build/osmocom-release-tarballs.sh

View File

@ -5,6 +5,8 @@
#
# Environment variables:
# * KEEP_TEMP: do not delete cloned repositories (use for development)
# * EXISTING_TARBALLS_FROM_JENKINS: set to 1 to get the existing tarballs from
# the last run of the jenkins job
SSH_COMMAND="ssh -o UserKnownHostsFile=/build/known_hosts -p 48"
OSMO_GIT_URL="https://git.osmocom.org"
OSMO_RELEASE_REPOS="
@ -207,7 +209,10 @@ remove_temp_dir() {
}
get_existing_tarballs() {
if ! $SSH_COMMAND releases@ftp.osmocom.org -- \
if [ -n "$EXISTING_TARBALLS_FROM_JENKINS" ]; then
wget -O "$TEMP"/existing_tarballs \
https://jenkins.osmocom.org/jenkins/job/Osmocom-release-tarballs/ws/release-tarball-build-dist/_temp/existing_tarballs
elif ! $SSH_COMMAND releases@ftp.osmocom.org -- \
find web-files -name '*.tar.bz2' \
> "$TEMP"/existing_tarballs; then
echo "ERROR: getting existing tarballs from remote failed!"