{"id":22351916,"url":"https://github.com/screwdriver-cd/sonar-pipeline","last_synced_at":"2026-03-19T22:31:07.194Z","repository":{"id":54062828,"uuid":"131077049","full_name":"screwdriver-cd/sonar-pipeline","owner":"screwdriver-cd","description":"Pipeline to deploy sonarqube server to kubernetes","archived":false,"fork":false,"pushed_at":"2023-07-10T13:16:08.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-01-31T13:15:02.875Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cd.screwdriver.cd/pipelines/704","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/screwdriver-cd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-26T00:06:29.000Z","updated_at":"2021-06-26T07:02:21.000Z","dependencies_parsed_at":"2022-08-13T06:20:55.541Z","dependency_job_id":null,"html_url":"https://github.com/screwdriver-cd/sonar-pipeline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fsonar-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fsonar-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fsonar-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fsonar-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/screwdriver-cd","download_url":"https://codeload.github.com/screwdriver-cd/sonar-pipeline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245650496,"owners_count":20650105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T12:16:30.601Z","updated_at":"2026-01-05T08:52:49.563Z","avatar_url":"https://github.com/screwdriver-cd.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# sonar-pipeline\n [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url]![License][license-image] [![Slack][slack-image]][slack-url]\n\nPipeline to deploy sonarqube server to kubernetes. Currently it only supports updating sonarqube's image. Other configuration requires manual update via helm.\n\n## First Time Deployment\nTo simplify the deployment, we are using helm, the package manager for k8s, to bundle all we need for sonar and deploy them all at once. Example `values.yaml` can be found under `config-example` folder. The actual config files are stored somewhere else secretly.\n- Prerequisite:\n    1. install helm client on your dev machine: `brew install kubernetes-helm`\n    2. init helm in k8s cluster: https://docs.helm.sh/using_helm\n- Deployment:\n    1. Switch to the desired context\n    ```bash\n    kubectl config use-context desired-cluster-context\n    ```\n\n    2. Deploy beta sonar using sonarqube chart\n    ```bash\n    helm install --name beta -f beta-values.yaml stable/sonarqube\n    ```\n\n    3. Deploy prod sonar using sonarqube chart\n    ```bash\n    helm install --name prod -f values.yaml stable/sonarqube\n    ```\n\n    After deployment, you should be able to see such a set of resources created for sonarqube, e.g. for beta:\n\n    ```bash\n    ==\u003e v1/Service\n    beta-postgresql  \n    beta-sonarqube   \n\n    ==\u003e v1beta1/Deployment\n    beta-postgresql  \n    beta-sonarqube   \n\n    ==\u003e v1beta1/Ingress\n    beta-sonarqube\n\n    ==\u003e v1/Pod(related)\n    beta-postgresql\n    beta-sonarqube\n\n    ==\u003e v1/Secret\n    beta-postgresql\n\n    ==\u003e v1/ConfigMap\n    beta-sonarqube-config         \n    beta-sonarqube-install-plugins  \n    beta-sonarqube-startup          \n    beta-sonarqube-tests            \n\n    ==\u003e v1/PersistentVolumeClaim\n    beta-postgresql   \n    beta-sonarqube\n    ```\n\n- Manual update in sonar UI:\n\n    For the following config, it's not configurable during boot time. Need to do it after sonar is up and running.\n  1. Go to **${your-sonar-host}** and log in as `admin`.\n  2. Go to **${your-sonar-host}/account/security**: change the default admin password\n  3. Go to **${your-sonar-host}/admin/permissions**: unselect `Execute Analysis` and `Create Projects` for group `Anyone`\n\n  **Notes**: all these configurations will be persistent as long as the PVC(persistent volume claim) is not deleted.\n\n## Update config\n```bash\nhelm upgrade -f beta-values.yaml beta stable/sonarqube\nhelm upgrade -f values.yaml prod stable/sonarqube\n```\n\n## List helm releases\n```bash\nhelm list\n```\n\n## Delete the whole sonar system\nBe careful about running this command, it will wipe out everything for sonar even the PVC.\n```bash\nhelm del --purge beta\nhelm del --purge beta\n```\n\n## License\n\nCode licensed under the BSD 3-Clause license. See LICENSE file for terms.\n\n[license-image]: https://img.shields.io/npm/l/screwdriver-api.svg\n[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/screwdriver.svg\n[issues-url]: https://github.com/screwdriver-cd/screwdriver/issues\n[status-image]: https://cd.screwdriver.cd/pipelines/704/badge\n[status-url]: https://cd.screwdriver.cd/pipelines/704\n[daviddm-image]: https://david-dm.org/screwdriver-cd/screwdriver.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/screwdriver-cd/screwdriver\n[slack-image]: http://slack.screwdriver.cd/badge.svg\n[slack-url]: http://slack.screwdriver.cd/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fsonar-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrewdriver-cd%2Fsonar-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fsonar-pipeline/lists"}