blob: d79f120290e062333b3e0124c8662b89bdb25c2b [file] [log] [blame]
#!/bin/bash
set -eu
MYDIR="$(dirname $0)"
. "${MYDIR}/../config"
. "${MYDIR}/../auth"
NAME="$1"
if ! test -r "$NAME"; then
echo 1>&2 "Input file $NAME does not exist"
exit 1
fi
curl -f -u "${JENKINS_USER}:${JENKINS_TOKEN}" -XPOST "${URL}/${NAME}/config.xml" --data-binary "@${NAME}" -H "Content-Type:text/xml"