2021-08-16 14:21:46 +02:00
|
|
|
#!/usr/bin/env bash
|
2014-01-31 22:34:25 +01:00
|
|
|
|
|
|
|
# the base url of the bamboo server
|
|
|
|
baseurl="$1/updateAndBuild.action?buildKey="
|
|
|
|
|
|
|
|
#
|
|
|
|
# Use the REST API to trigger a build
|
|
|
|
#
|
|
|
|
|
|
|
|
# Moves to the 2nd param (first is URL)
|
|
|
|
shift
|
|
|
|
# Loop for each build key
|
2021-08-16 13:45:32 +02:00
|
|
|
while (("$#")); do
|
2014-01-31 22:34:25 +01:00
|
|
|
|
2021-08-16 13:45:32 +02:00
|
|
|
#
|
|
|
|
# Invoke the trigger
|
|
|
|
#
|
|
|
|
remoteCall=$baseurl$1
|
|
|
|
echo "Detected last directory that was committed ... triggering $remoteCall"
|
|
|
|
/usr/bin/wget --timeout=10 -t1 $remoteCall -O /dev/null
|
|
|
|
shift
|
2014-01-31 22:34:25 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
exit 0
|