Sonarqube gitlab report publisher not finishing - jenkins

I am running sonar-scanner for a repo from gitlab on jenkins. Sonar-scanner upload reports to sonarqube successfully.
The roadmap on jenkins is that: clone repo from gitlab. Start sonar-scanner inside docker container. Sonar-scanner upload reports to sonarqube and open discussion on gitlab commit.
The report file dir size is 13 MB zip size 6MB. I am using proxy for sonarqube. That means my proxy is set correctly(On kubernetes with annotation that is nginx.ingress.kubernetes.io/proxy-body-size).
My problem is that gitlab issue publisher not finishing for analysis. I tried on a directory that produces 100kb report file size that is successfully open disscussion on gitlab. I think my issue is related with the report size. But couldn't find any solution.
Do you have any?
Additional infoes:
Sonarqube version: 7.9.3 (build 33349) CE
Sonar-Scanner: sonarsource/sonar-scanner-cli: latest(Digest:sha256:135815)
Gitlab Version: GitLab Community Edition 11.9.1
Sonar-gitlab-plugin: https://github.com/gabrie-allaigre/sonar-gitlab-plugin (sonar-gitlab-plugin-4.1.0-SNAPSHOT)

Sonarqube was behind a load balancer. I increased proxy-body-size on both sonarqube and nginx load balancer to 25 mb and t solved. If you face with similar issue look your web server configs.

Related

SonarQube server [http://localhost:9000] can not be reached :Unable to execute SonarQube: Fail to download libraries from server:

Sonarqube dev edition is running in container its accessible through public ip:9000(aws ec2 ubuntu).github apps configuration is valid, added sonar token and sonar host url values as given by sonarqube integration with github actions workflow , No idea why its pointing to localhostenter image description here
issue got resolved when i run my Sonarqube with https and open to public access

java.nio.channels.ClosedChannelException in jenkins kubernetes

Executing Maven build in jenkins pod(container) using jenkins Kubernetes
Created a maven build
I am cloning from git
Then trying to execute the junit scripts
For few builds I faced pom.xml path issue
Later after clone I faced java.nio.channels.ClosedChannelException
Now directly once the build starts getting this error java.nio.channels.ClosedChannelException
More Info:
I also increased memory but didnt worked
enter image description here
I was using the same port for docker Jenkins and local jenkins. I made com.nirima.jenkins.plugins.docker.DockerContainerWatchdog.enabled=false on ALL the Jenkins servers as per some reference.But still facing the issue

how could i publish sonarqube report in jenkins? using the sonarqube portlet

I have configured sonarqube for one of my projects, but now i want to publish the sonarqube details in my jenkins dashboard. what could be the best possible way to do that?
I'm not sure that there is a straight forward way of getting "all" the data from sonar on to your Jenkins dashboard but can actually get a sonar badge and Quality gate info by using the Sonar plugin for Jenkins.
https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/?q=cache:Tbhy8757pK4J:https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/+&cd=1&hl=en&ct=clnk&gl=us
First of all, you need to deploy sonarqube on your local machine, ones it is done, then copy the URL of your sonarqube server, I am assuming, you have deployed sonarqube server on port 9090, once this done, log in to the sonarqube server and then create a project and then generate a token for that project:
Once these above configuration is done, just hit below maven command to generate sonarqube report on the sonarqube server:
mvn sonar:sonar -Dsonar.projectKey=[projectName] -Dsonar.host.url=http://localhost:9090 -Dsonar.login=[tokenId]
Below is the screenshot, this is how your reports on the sonarqube will looks like:

How can use SonarScanner from Jenkins while running on a different server (than Sonar)?

I use Jenkins for Continuous Integration, and I plan to add SonarQube to its tasks. I know it is possible to run SonarQube server and database remotely from the scanner, thanks to the documentation.
I tried to install sonarqube and sonarscanner plugins in Jenkins, setting up a slave connected to the server hosting sonarqube and sonarscanner, but Jenkins can't trigger a scan.
I also don't understand how Sonar would get the code ? Is Jenkins supposed to send it all to the server ?
Or do I have to manage the pulling from the repository on the server hosting Sonar ?
You're correct, the scanner must be on the build machine.

Deploying a SpringBoot into another server in a docker through Jenkins

I'm new to CI/CD process.
We have a model deploying a spring boot application through jenkins in docker in a same machine.
We was searching in internet how to deploy an application to another server, the only key which we have got is through SSH agent. I hope SSH is only for communicating.
Can we have a complete example how to deploy into another server and what are the other preventive measure to be taken into account.
Kindly guide us
In your Jenkins pipeline you need to define a stage for publishing the docker image and in your infrastructure you need a repository that stores your artifacts and docker images.
Repositories I know are Nexus or JFrog Artifactory.
So your server1, at the end of the pipeline, will upload the stable docker image to Nexus.
To execute the docker images in another server (not using an orchestrator) you may use Ansible.
On the net you can find a lot of sources, for example: https://www.codementor.io/mamytianarakotomalala/how-to-deploy-docker-container-with-ansible-on-debian-8-mavm48kw0

Resources