Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

I am pretty new to the Developement community and specifically to DevOps practices, as a part of the project we are trying to integrate SonarQube with Gitlab, did some R& D on SonarQube and Git CI ( Continuous Integration ) and look like the plugin is released for Github and SonarQube whereas not for Gitlab.

How realistic is it to configure GitLab with SonarQube for inspecting code quality for every pull request and what will be the best practice to integrate these two pieces.

Thanks

1 Answer

0 votes
by (50.2k points)

In .gitlab-ci.yml make changes as per the code 

stages: 

- build 

build_master:

  image: maven

  stage: build

  artifacts:

    paths:

    - target/*.jar

  script:

  - mvn package sonar:sonar -Dsonar.host.url=https://sonar.yourdomain.tld/ 

  only:

  - master

This will help for the java project if you required to see the plugins go through

https://gitlab.talanlabs.com/gabriel-allaigre/sonar-gitlab-plugin.git

https://git.johnnei.org/Johnnei/sonar-gitlab-plugin.git

These are the sonar Qube plugins through which you can easily integrate into gitlab.

Also, if you want to learn more about DevOps, you can enroll in DevOps Training.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Apr 20, 2021 in DevOps and Agile by dev_sk2311 (45k points)
0 votes
1 answer
asked Apr 20, 2021 in DevOps and Agile by dev_sk2311 (45k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...