Created
July 12, 2018 12:36
-
-
Save kumbasar/cbe8afe526adb6a5443f24d1f817d118 to your computer and use it in GitHub Desktop.
Sonarqube and CXX plugin installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sonar_version="6.7.4" | |
cxx_version="1.1.0" | |
SONAR_HOME="/home/one/sonarqube" | |
#Stop and delete sonarqube installation | |
$SONAR_HOME/bin/linux-x86-64/sonar.sh stop | |
rm -rf $SONAR_HOME/ | |
#Download Sonarqube and cxx | |
wget -c https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-$sonar_version.zip -P ~/ | |
wget -c https://github.com/SonarOpenCommunity/sonar-cxx/releases/download/cxx-$cxx_version/sonar-cxx-plugin-$cxx_version.jar -P ~/ | |
#Install Sonarqube and cxx | |
unzip ~/sonarqube-$sonar_version.zip -d ~ | |
mv ~/sonarqube-$sonar_version/ $SONAR_HOME/ | |
mv ~/sonar-cxx-plugin-$cxx_version.jar $SONAR_HOME/extensions/plugins/ | |
rm -rf ~/sonarqube-$sonar_version.zip | |
#Start sonarqube | |
$SONAR_HOME/bin/linux-x86-64/sonar.sh start | |
echo "Checkout sonarqube @ http://localhost:9000/" | |
#sonar-runner properties setup | |
sudo cp /opt/sonar-runner/conf/sonar-runner.properties /opt/sonar-runner/conf/sonar-runner.properties.bkp | |
echo "sonar.host.url=http://localhost:9000" | sudo tee /opt/sonar-runner/conf/sonar-runner.properties | |
echo "sonar.login=admin" | sudo tee --append /opt/sonar-runner/conf/sonar-runner.properties | |
echo "sonar.password=admin" | sudo tee --append /opt/sonar-runner/conf/sonar-runner.properties | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment