AWS codepipeline integration with SonarQube

0

Hi Team,

Would like to know the steps involved in "AWS codepipeline integration with SonarQube". If any implemented successfully can you guide?

질문됨 일 년 전373회 조회
1개 답변
0

Your SonarQube instance needs to be accessible from the pipeline environment. Basically you need have your sonar.login and sonar.host.url need to be fed into your pipeline. Here’s a dead simple buildspec.yaml that will run a Maven build and scan, then push results to a SQ instance:

env:
  variables:
    SONAR_LOGIN: "SONARQUBE_AUTHTOKEN"
    SONAR_HOST: "SONARQUBE_URL"
    #good to use parameter-store
phases:
  build:
    commands:
      - mvn test123
  post_build:
    commands:
      - mvn sonar:sonar -Dsonar.login=$SONAR_LOGIN -Dsonar.host.url=$SONAR_HOST

This was like completed few years back for one of my client. Also you can explore SonarCloud as well if possible. Checkout below documentation. https://aws.amazon.com/blogs/devops/integrating-sonarcloud-with-aws-codepipeline-using-aws-codebuild/

답변함 일 년 전
  • Thanks Shashank, I am exploring sonarcloud integration with our aws codepipeline now.

    The given doc about buildspec.yaml about maven build, can i have gradle buildspec.yaml.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠