CICD Pipeline using Jenkins & ArgoCD
  • About the project
  • Overview of the application
  • Dockerizing the application
  • Configure EC2 instance to setup the CI pipeline
  • Configure Jenkins on EC2 instance
  • Create Jenkins CI pipeline
  • Setting up SonarQube server
  • Configure DockerHub and GitHub access tokens inside Jenkins
  • Add GitHub Webhook trigger
  • Execute the Jenkins Build
  • Configure EC2 instance to setup the CD pipeline
  • Install MiniKube and Kubectl
  • Install ArgoCD
  • Deploy the app to Kubernetes using ArgoCD
Powered by GitBook
On this page

Setting up SonarQube server

PreviousCreate Jenkins CI pipelineNextConfigure DockerHub and GitHub access tokens inside Jenkins

Last updated 1 year ago

To setup the Sonarqube server on the EC2 instance, use the following commands:

sudo apt install unzip
sudo su -
adduser sonarqube
sudo su - sonarqube
wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-9.4.0.54424.zip
unzip *
chmod -R 755 /home/sonarqube/sonarqube-9.4.0.54424
chown -R sonarqube:sonarqube /home/sonarqube/sonarqube-9.4.0.54424
cd sonarqube-9.4.0.54424/bin/linux-x86-64/
./sonar.sh start

The SonarQube server can be accessed using the following URL:

http://<ip address of instance>:9000

Enter both username and password as "admin" and change the password after logging in.

Go to Profile > Security and generate a new token which will be used in the Jenkins pipeline.

Inside Jenkins Dashboard, go to Manage Jenkins > Credentials > System > Global Credentials and add a new credential. Set the Kind as Secret Text and paste the SonarQube token and put the ID as "sonarqube". This ID is used to fetch the token in the Jenkinsfile.

SonarQube homepage
Generating a token for Jenkins