abort.sh: make the script pass shellcheck, and use a trap to remove the temp file

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 8f807691
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment