{"id":18789966,"url":"https://github.com/chetanppatil/sonar-scanner-cloud-builder","last_synced_at":"2026-02-23T01:10:22.417Z","repository":{"id":94285279,"uuid":"301679739","full_name":"chetanppatil/sonar-scanner-cloud-builder","owner":"chetanppatil","description":"Cloud Builder Docker Image For Sonar Scanner ","archived":false,"fork":false,"pushed_at":"2021-04-28T08:17:12.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T16:42:06.345Z","etag":null,"topics":["cloud-builder","sonar-scanner"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chetanppatil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-10-06T09:42:49.000Z","updated_at":"2021-04-28T08:17:14.000Z","dependencies_parsed_at":"2023-04-02T11:19:02.129Z","dependency_job_id":null,"html_url":"https://github.com/chetanppatil/sonar-scanner-cloud-builder","commit_stats":null,"previous_names":["the-chetan07/sonar-scanner-cloud-builder","chetanppatil/sonar-scanner-cloud-builder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chetanppatil/sonar-scanner-cloud-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fsonar-scanner-cloud-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fsonar-scanner-cloud-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fsonar-scanner-cloud-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fsonar-scanner-cloud-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chetanppatil","download_url":"https://codeload.github.com/chetanppatil/sonar-scanner-cloud-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chetanppatil%2Fsonar-scanner-cloud-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29734462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cloud-builder","sonar-scanner"],"created_at":"2024-11-07T21:09:21.474Z","updated_at":"2026-02-23T01:10:22.380Z","avatar_url":"https://github.com/chetanppatil.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SonarQube Scanning\r\nThis builder allows you to run static code analysis using Sonarqube on your code.\r\n\r\n## Building this builder\r\nRun the command below to build this builder\r\n\r\n```sh\r\ngcloud builds submit . --config=cloudbuild.yaml\r\n```\r\n\r\n## Build image locally\r\nRun this command to build `sonar-scanner` image locally\r\n\r\n```sh\r\ndocker build --build-arg SONARQUBE_SCANNER_CLI_VERSION=4.4.0.2170 -t \u003cIMAGE-NAME-TO-GIVE\u003e .\r\n```\r\n\u003e e.g. `docker build --build-arg SONARQUBE_SCANNER_CLI_VERSION=4.4.0.2170 -t sonar-scanner .`\r\n\r\n## Running the analysis\r\n- Locally (_enter into directory where you want to run sonar scan and execute below command_)\r\n\r\n  ```sh\r\n  docekr run -it \u003cIMAGE-NAME-TO-GIVE\u003e sonar-scanner \\\r\n    -Dsonar.projectKey=\u003cSONAR-PROJECT-KEY\u003e \\\r\n    -Dsonar.projectName=\u003cSONAR-PROJECT-NAME\u003e \\\r\n    -Dsonar.host.url=https://\u003cGIT-ORG-URL\u003e \\\r\n    -Dsonar.login=\u003cSONAR-LOGIN\u003e \\\r\n    -Dsonar.sources=.\r\n  ```\r\n\r\n- Cloud build\r\n\r\n  ```yaml\r\n  - id: Sonar Analysis\r\n    name: 'gcr.io/$PROJECT_ID/sonar-scanner:latest'\r\n    entrypoint: bash\r\n    args:\r\n      - '-c'\r\n      - |\r\n        sonar-scanner \\\r\n          -Dsonar.projectKey=\u003cSONAR-PROJECT-KEY\u003e \\\r\n          -Dsonar.projectName=\u003cSONAR-PROJECT-NAME\u003e \\\r\n          -Dsonar.host.url=\u003cSONAR-HOST-URL\u003e \\\r\n          -Dsonar.login=\u003cSONAR-LOGIN\u003e \\\r\n          -Dsonar.sources=. \\\r\n          -Dsonar.pullrequest.github.endpoint=https://\u003cGIT-ORG-URL\u003e/api/v3 \\\r\n          -Dsonar.pullrequest.github.repository=\u003cGIT-ORG-NAME-IF-ANY\u003e/$REPO_NAME \\\r\n          -Dsonar.pullrequest.key=$_PR_NUMBER \\\r\n          -Dsonar.pullrequest.branch=$BRANCH_NAME \\\r\n          -Dsonar.pullrequest.base=$_BASE_BRANCH \\\r\n          -Dsonar.java.binaries=**/target/classes \\\r\n          -Dsonar.java.source=1.8 \\\r\n          -Dsonar.java.libraries=**/target/*.jar \\\r\n          -Dsonar.javascript.lcov.reportPaths=**/coverage/lcov.info \\\r\n          -Dsonar.exclusions=**/test/**,**/config/** \\\r\n          -Dsonar.eslint.reportPaths=**/eslint-report.json\r\n  ```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetanppatil%2Fsonar-scanner-cloud-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchetanppatil%2Fsonar-scanner-cloud-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchetanppatil%2Fsonar-scanner-cloud-builder/lists"}