2020-02-24 12:32:04 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set +x
|
|
|
|
|
|
|
|
VERSION="\[RELEASE\]"
|
2021-01-05 09:08:38 +01:00
|
|
|
HTTP_CODE=$(\
|
|
|
|
curl \
|
|
|
|
--write-out '%{http_code}' \
|
|
|
|
--location \
|
|
|
|
--remote-name \
|
|
|
|
--user "$ARTIFACTORY_PRIVATE_USERNAME:$ARTIFACTORY_API_KEY" \
|
|
|
|
"$ARTIFACTORY_URL/sonarsource-private-releases/com/sonarsource/iris/iris/$VERSION/iris-$VERSION-jar-with-dependencies.jar"\
|
|
|
|
)
|
2020-02-24 12:32:04 +01:00
|
|
|
|
|
|
|
if [ "$HTTP_CODE" != "200" ]; then
|
|
|
|
echo "Download $VERSION failed -> $HTTP_CODE"
|
2021-01-05 09:18:00 +01:00
|
|
|
exit 1
|
2020-02-24 12:32:04 +01:00
|
|
|
else
|
|
|
|
echo "Downloaded $VERSION"
|
|
|
|
fi
|
|
|
|
|
|
|
|
java -Diris.projectKey=org.sonarsource.sonarqube:sonarqube \
|
|
|
|
-Diris.source.url=https://next.sonarqube.com/sonarqube \
|
|
|
|
-Diris.source.token=$NEXT_TOKEN \
|
|
|
|
-Diris.destination.url=$SONAR_HOST_URL \
|
|
|
|
-Diris.destination.token=$SONAR_TOKEN \
|
|
|
|
-Diris.maxcountposts=50 \
|
2021-01-05 09:18:00 +01:00
|
|
|
-jar iris-\[RELEASE\]-jar-with-dependencies.jar
|