osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/31251 )
Change subject: release-tarball: add var to use list from jenkins ......................................................................
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 --- M release-tarball-build-dist/Dockerfile M release-tarball-build-dist/jenkins.sh M release-tarball-build-dist/osmocom-release-tarballs.sh 3 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/51/31251/1
diff --git a/release-tarball-build-dist/Dockerfile b/release-tarball-build-dist/Dockerfile index dcfea51..e8ffd21 100644 --- a/release-tarball-build-dist/Dockerfile +++ b/release-tarball-build-dist/Dockerfile @@ -69,6 +69,7 @@ mscgen \ python3-nwdiag \ rsync \ + wget \ xsltproc \ && \ apt-get clean diff --git a/release-tarball-build-dist/jenkins.sh b/release-tarball-build-dist/jenkins.sh index d59aa15..8ea3c27 100755 --- a/release-tarball-build-dist/jenkins.sh +++ b/release-tarball-build-dist/jenkins.sh @@ -10,6 +10,7 @@ -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 diff --git a/release-tarball-build-dist/osmocom-release-tarballs.sh b/release-tarball-build-dist/osmocom-release-tarballs.sh index 1229591..4dc2bdd 100644 --- a/release-tarball-build-dist/osmocom-release-tarballs.sh +++ b/release-tarball-build-dist/osmocom-release-tarballs.sh @@ -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 @@ }
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-... + 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!"