This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit ad427f89dfb7ea5346363bf0a3a169825573fb92 Author: Mihai Moldovan <ionic@ionic.de> Date: Sat Jun 10 04:55:52 2017 +0200 bin: add new slave-start-prepare.sh script, used to update build scripts, the jenkins jar file and start the latter. --- bin/slave-start-prepare.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/bin/slave-start-prepare.sh b/bin/slave-start-prepare.sh new file mode 100755 index 0000000..c2c7f22 --- /dev/null +++ b/bin/slave-start-prepare.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -e + +typeset prefix="$(cut -d"-" -f1 <<< "$(basename "${0}")")" + +# Generate this stuff via: +# - openssl s_client -showcerts -servername hostname -connect host:port +# - copy the first PEM-encoded certificate to ${cert} +# - add the "-----BEGIN CERTIFICATE-----" header and "-----END CERTIFICATE-----" footer to ${cert} +# - openssl x509 -noout -pubkey < "${cert}" | openssl asn1parse -noout -inform pem -out /dev/stdout | openssl dgst -sha256 -binary | openssl base64 +typeset ssl_hash="" +typeset host="" +if [ "x$(basename "${0}")" = "x${prefix}-slave-start-prepare.sh" ]; then + case "${prefix}" in + (x2go) + host="japsand.x2go.org:8443" + ssl_hash="sha256//47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=" + ;; + (*) + echo "Unknown prefix, aborting." >&2 + exit 1 + ;; + esac +else + echo "No prefix provided. Aborting." >&2 + exit 1 +fi + +"${HOME}/bin/slave-sync.sh" + +rm -f -- "slave.jar" + +wget -NS --pinnedpubkey="${ssl_hash}" "https://${host}/jnlpJars/slave.jar" + +java -jar "slave.jar" -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git