Skip to content

toyamagu-2021/terraform-aws-gitlab-sonarqube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-gitlab-sonarqube

Setup SonarQube

GitLab OAuth

  1. In GitLab
    1. Admin -> Application -> New Application
    2. Create Application
      • Name: arbitral
      • RedirectURL: http://<your_sonarqube_dns>/oauth2/callback/gitlab
      • Checked
        • Trusted
        • Confidential
        • Scopes.api
    3. Copy ApplicationID and Secret
  2. In SonarQube
    1. Administration -> Configuration -> DevOps Platform Integrations -> GitLab
      • GitLab Authentication
        • Enabled: true
        • GitLabURL: http://<your_gitlab_dns>
        • AppliactionID: ApplicationID
        • Secret: Secret
        • Allow userd to sign-up: arbitral
        • Synchronize user groups: arbitral (Fllowing, We assume to set true)
    2. Administration -> Configuration -> Generatl -> Server base URL
      • See Issue
      • Server base URL: http://<your_sonarqube_dns>/
  3. (Optional) Synchronize user groups with GitLab
    1. Create gruop in GitLab ( admin-group )
    2. Administration -> Security -> Groups
    3. Create Gruop: admin-group
    4. Administration -> Security -> GlobalPermissions
    5. Attach permissions

GitLab Integration

  1. In GitLab
    1. Create Machine user
      • sonarqube-user
    2. Create Impersonation Token
      • sonarqube-user-impersonation-token
      • Copy token
  2. SonarQube
    1. Register GitLab
      • register gitlab
      • register gitlab

Project

  1. In GitLab
    1. Create Golang project from template
    2. Create Personal access token and copy token
  2. In SonarQube
    1. Register GitLab Project
      • We see waring because GitLab user soanr-user is not assinged to the project.
      • If you not assign sonar-cube user to the project, SonarQube may create bot user in the project at some time.
    2. Follow instractions
  3. Assign sonar-user to GitLab Project
  4. Automatically CICD is runned
    • Check job is compeleted successfully
    • See SonarCube console
    • Create develop branch and check SonarQube plugin operates normally
  5. You Can see bot in MR

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published