diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-07 19:37:33 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-04-18 18:03:01 +0200 |
commit | d063f4a447c33ecc6b0e8b58f7ab62f7e666d17c (patch) | |
tree | f8b2363c127820b0ef4d17a593ab9877710a032e | |
parent | 2b0e38bbaea82bb0c19486810a7e13a36fe6c615 (diff) | |
download | jenkins.debian.net-d063f4a447c33ecc6b0e8b58f7ab62f7e666d17c.tar.xz |
reproducible: build: refactor: fix message and path in save_artifacts()
-rwxr-xr-x | bin/reproducible_build.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 5fc21698..a31df589 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -32,17 +32,18 @@ create_results_dirs() { save_artifacts() { local random=$(head /dev/urandom | tr -cd '[:alnum:]'| head -c5) + local BASE="/var/lib/jenkins/userContent" local ARTIFACTS="artifacts/r00t-me/${SRCPACKAGE}_${SUITE}_tmp-${random}" local URL="$REPRODUCIBLE_URL/$ARTIFACTS/" - local HEADER="$ARTIFACTS/.HEADER.html" - mkdir -p /var/lib/jenkins/userContent/$ARTIFACTS - cp -r $TMPDIR/* /var/lib/jenkins/userContent/$ARTIFACTS/ + local HEADER="$BASE/$ARTIFACTS/.HEADER.html" + mkdir -p $BASE/$ARTIFACTS + cp -r $TMPDIR/* $BASE/$ARTIFACTS/ echo | tee -a ${RBUILDLOG} local msg="Artifacts from this build are preserved. They will be available for 72h only, so download them now if you want them.\n" - local msg="WARNING: You shouldn't trust packages you downloaded from this host, they can contain malware or the worst of your fears, packaged nicely in debian format.\n" - local msg="If you are not afraid facing your fears while helping the world by investigating reproducible build issues, you can download the artifacts from the following location: $URL\n" - echo $msg | tee -a $BUILDLOG - echo $msg | sed 's#\n#\n<br />#g' > $HEADER + local msg="${msg}WARNING: You shouldn't trust packages you downloaded from this host, they can contain malware or the worst of your fears, packaged nicely in debian format.\n" + local msg="${msg}If you are not afraid facing your fears while helping the world by investigating reproducible build issues, you can download the artifacts from the following location: $URL\n" + printf "$msg" | tee -a $BUILDLOG + echo "$msg" | sed 's#\n#\n<br />#g' > $HEADER echo "Package page: <a href=\"$REPRODUCIBLE_URL/${SUITE}/${ARCH}/${SRCPACKAGE}\">$REPRODUCIBLE_URL/${SUITE}/${ARCH}/${SRCPACKAGE}</a><br />" >> $HEADER chmod 644 $HEADER echo | tee -a ${RBUILDLOG} |