aboutsummaryrefslogtreecommitdiffstats
path: root/.travis/run_iris.sh
blob: d08dec5648391565bc364ba5ac4262f62c2bc906 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set +x

VERSION="\[RELEASE\]"
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"\
)

if [ "$HTTP_CODE" != "200" ]; then
  echo "Download $VERSION failed -> $HTTP_CODE"
  exit 1
else
  echo "Downloaded $VERSION"
fi

java \
  -Diris.source.projectKey=org.sonarsource.sonarqube:sonarqube-private \
  -Diris.source.url=https://next.sonarqube.com/sonarqube \
  -Diris.source.token=$NEXT_TOKEN \
  -Diris.destination.projectKey=sonarqube \
  -Diris.destination.url=https://next.sonarqube.com/sonarqube \
  -Diris.destination.token=$NEXT_TOKEN \
  -Diris.maxcountposts=50 \
  -jar iris-\[RELEASE\]-jar-with-dependencies.jar