[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: abort.sh: set -e so everything fails if something fails in here

Mattia Rizzolo gitlab at salsa.debian.org
Mon May 20 20:46:17 BST 2019



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
8f807691 by Mattia Rizzolo at 2019-05-20T19:44:40Z
abort.sh: set -e so everything fails if something fails in here

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -
923d22a2 by Mattia Rizzolo at 2019-05-20T19:45:07Z
abort.sh: make the script pass shellcheck, and use a trap to remove the temp file

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- bin/abort.sh


Changes:

=====================================
bin/abort.sh
=====================================
@@ -1,10 +1,11 @@
-#!/bin/bash
+#!/bin/sh
+
+set -e
 
 # generally interesting: BUILD_* JENKINS_* JOB_* but most is in BUILD_URL, so:
-export | egrep "(BUILD_URL=)"
+export | grep -E "(BUILD_URL=)"
 TMPFILE=$(mktemp)
+trap 'rm "$TMPFILE"' EXIT
 
-curl https://jenkins.debian.net/jnlpJars/jenkins-cli.jar -o $TMPFILE
-java -jar $TMPFILE -s http://localhost:8080/ set-build-result aborted
-rm $TMPFILE
-exit
+curl https://jenkins.debian.net/jnlpJars/jenkins-cli.jar -o "$TMPFILE"
+java -jar "$TMPFILE" -s http://localhost:8080/ set-build-result aborted



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/df8c1fb410446109ca573f14bba0fe3363912dae...923d22a2b58d6c09bbd82e47f415a1f8400e5828

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/compare/df8c1fb410446109ca573f14bba0fe3363912dae...923d22a2b58d6c09bbd82e47f415a1f8400e5828
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20190520/bb07d9c4/attachment.html>


More information about the Qa-jenkins-scm mailing list