forked from NitorCreations/willow-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart-willow.sh
executable file
·16 lines (14 loc) · 1.28 KB
/
start-willow.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# Set env variable BUILD if you need a specific build - otherwise the last successful build is fetched
if [ -z "$BUILD" ]; then
BUILD=$(curl -s https://bob.nitorio.us/jenkins/job/willow-integrationtests/api/xml/?xpath=/mavenModuleSet/lastSuccessfulBuild/number | awk -F'<|>' '{ print $3 }')
fi
if ! [ -r willow-servers-$BUILD.jar -a -x deployer.sh ]; then
ARTIFACT_PATH=$(curl -s "https://bob.nitorio.us/jenkins/job/willow-integrationtests/$BUILD/com.nitorcreations\$willow-servers/api/xml?xpath=/mavenBuild/artifact\[contains(relativePath/text(),'uber.jar')\]/relativePath" | awk -F'<|>' '{ print $3 }')
DEPLOYER_ARTIFACT_PATH=$(curl -s "https://bob.nitorio.us/jenkins/job/willow-integrationtests/$BUILD/com.nitorcreations\$willow-deployer/api/xml?xpath=/mavenBuild/artifact\[contains(relativePath/text(),'.sh')\]/relativePath" | awk -F'<|>' '{ print $3 }')
curl -s -o willow-servers-$BUILD.jar "https://bob.nitorio.us/jenkins/job/willow-integrationtests/$BUILD/com.nitorcreations\$willow-servers/artifact/$ARTIFACT_PATH" &
curl -s -o deployer.sh "https://bob.nitorio.us/jenkins/job/willow-integrationtests/$BUILD/com.nitorcreations\$willow-deployer/artifact/$DEPLOYER_ARTIFACT_PATH" &
wait
chmod 755 deployer.sh
fi
exec ./deployer.sh start test file:./backend.properties?BUILD=$BUILD