Gitlab integration with SonarQube

后端 未结 5 987
醉酒成梦
醉酒成梦 2021-01-30 14:50

I am pretty new to Development community and specifically to DevOps practices , as a part of project we are trying to integrate SonarQube with Gitlab , did some R& D on Sona

5条回答
  •  误落风尘
    2021-01-30 15:21

    you don't really need a plugin. make something like this in your .gitlab-ci.yml

    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
    

    and every master push will be tested! (this is for a Java project...)

提交回复
热议问题