Skip to content

Commit

Permalink
added sonarqube
Browse files Browse the repository at this point in the history
  • Loading branch information
litan1106 committed Dec 23, 2023
1 parent 0c40968 commit cfda89d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions scripts/features/sonarqube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

if [ -f ~/.homestead-features/wsl_user_name ]; then
WSL_USER_NAME="$(cat ~/.homestead-features/wsl_user_name)"
WSL_USER_GROUP="$(cat ~/.homestead-features/wsl_user_group)"
else
WSL_USER_NAME=vagrant
WSL_USER_GROUP=vagrant
fi

export DEBIAN_FRONTEND=noninteractive

if [ -f /home/$WSL_USER_NAME/.homestead-features/sonarqube ]
then
echo "Sonarqube already installed."
exit 0
fi

touch /home/$WSL_USER_NAME/.homestead-features/sonarqube
chown -Rf $WSL_USER_NAME:$WSL_USER_GROUP /home/$WSL_USER_NAME/.homestead-features

# Install Java Runtime Enviroment
sudo apt update
sudo apt install unzip openjdk-17-jre -y

# Install Sonarqube
sudo mkdir /opt/sonarqube && cd /opt/sonarqube
sudo wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$1.zip
sudo unzip sonarqube-*.zip && sudo rm sonarqube-*.zip
sudo rm -rf /opt/sonarqube/sonarqube-$1.zip

0 comments on commit cfda89d

Please sign in to comment.