summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-03-27 20:56:12 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-27 20:56:12 +0100
commit182ee13f4c919683d3c59bf59fa55091376e8d61 (patch)
tree12a2ccc543336484ead688f504b2bfc66f783988
parent4131fb9d3d83c7b4df459c7e33d7eff91a24170c (diff)
downloadjenkins.debian.net-182ee13f4c919683d3c59bf59fa55091376e8d61.tar.xz
reproducible: refactor, save_artifacts is always an integer
-rwxr-xr-xbin/reproducible_build.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index d00b2adf..891f0968 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -24,7 +24,7 @@ create_results_dirs() {
}
cleanup_all() {
- if [ "$SAVE_ARTIFACTS" = "1" ] ; then
+ if [ $SAVE_ARTIFACTS -eq 1 ] ; then
local random=$(head /dev/urandom | tr -cd '[:alnum:]'| head -c5)
local ARTIFACTS="artifacts/r00t-me/${SRCPACKAGE}_${SUITE}_tmp-${random}"
mkdir -p /var/lib/jenkins/userContent/$ARTIFACTS
@@ -36,7 +36,7 @@ cleanup_all() {
echo "https://reproducible.debian.net/$ARTIFACTS" | tee -a ${RBUILDLOG}
echo | tee -a ${RBUILDLOG}
kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "https://reproducible.debian.net/$ARTIFACTS/ published" || true # don't fail the whole job
- elif [ "$SAVE_ARTIFACTS" = "2" ] ; then
+ elif [ $SAVE_ARTIFACTS -eq 2 ] ; then
echo "No artifacts were saved for this build." | tee -a ${RBUILDLOG}
kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "Check $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log to find out why no artifacts were saved." || true # don't fail the whole job
fi
@@ -168,7 +168,7 @@ else
SRCPACKAGE=$(echo $RESULT|cut -d "|" -f3)
SCHEDULED_DATE=$(echo $RESULT|cut -d "|" -f4)
SAVE_ARTIFACTS=$(echo $RESULT|cut -d "|" -f5)
- if [ "$SAVE_ARTIFACTS" = "1" ] ; then
+ if [ $SAVE_ARTIFACTS -eq 1 ] ; then
AANOUNCE=" Artifacts will be preserved."
else
AANOUNCE=""