plugins.sh ought to fail if a plugin download failed.
diff --git a/plugins.sh b/plugins.sh
index 948deec..f73a23a 100755
--- a/plugins.sh
+++ b/plugins.sh
@@ -8,6 +8,8 @@
# RUN /usr/local/bin/plugins.sh /plugins.txt
#
+set -e
+
REF=/usr/share/jenkins/ref/plugins
mkdir -p $REF
@@ -17,5 +19,5 @@
[[ ${plugin[0]} =~ ^\s*$ ]] && continue
[[ -z ${plugin[1]} ]] && plugin[1]="latest"
echo "Downloading ${plugin[0]}:${plugin[1]}"
- curl -s -L -f ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.jpi || echo "Failed to download ${plugin[0]}:${plugin[1]}"
+ curl -s -L -f ${JENKINS_UC}/download/plugins/${plugin[0]}/${plugin[1]}/${plugin[0]}.hpi -o $REF/${plugin[0]}.jpi
done < $1