{"id":16100453,"url":"https://github.com/elgohr/concourse-sonarqube-notifier","last_synced_at":"2025-03-17T17:31:23.435Z","repository":{"id":34575283,"uuid":"128561566","full_name":"elgohr/concourse-sonarqube-notifier","owner":"elgohr","description":"Concourse CI Resource for getting results from Sonarqube.","archived":false,"fork":false,"pushed_at":"2025-02-17T18:28:36.000Z","size":12053,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T02:23:28.091Z","etag":null,"topics":["concourse","concourse-ci","concourse-ci-resource","sonarqube"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elgohr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-07T19:34:33.000Z","updated_at":"2025-02-17T18:28:38.000Z","dependencies_parsed_at":"2023-02-17T23:01:15.659Z","dependency_job_id":"ad53fe51-4a86-49be-a86b-5b689095b0fc","html_url":"https://github.com/elgohr/concourse-sonarqube-notifier","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgohr%2Fconcourse-sonarqube-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgohr%2Fconcourse-sonarqube-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgohr%2Fconcourse-sonarqube-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elgohr%2Fconcourse-sonarqube-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elgohr","download_url":"https://codeload.github.com/elgohr/concourse-sonarqube-notifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243872436,"owners_count":20361480,"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":["concourse","concourse-ci","concourse-ci-resource","sonarqube"],"created_at":"2024-10-09T18:46:47.875Z","updated_at":"2025-03-17T17:31:23.152Z","avatar_url":"https://github.com/elgohr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SonarQube Notification Resource\n[![Test](https://github.com/elgohr/concourse-sonarqube-notifier/actions/workflows/test.yml/badge.svg)](https://github.com/elgohr/concourse-sonarqube-notifier/actions/workflows/test.yml)\n[![Publish](https://github.com/elgohr/concourse-sonarqube-notifier/actions/workflows/publish.yml/badge.svg)](https://github.com/elgohr/concourse-sonarqube-notifier/actions/workflows/publish.yml)\n\nGets Sonarqube results.\n\n## Installing\n\n`Shortcut`: [Pipeline example](https://github.com/elgohr/concourse-sonarqube-notifier/blob/master/example-pipeline.yml)\n\nUse this resource by adding the following to\nthe `resource_types` section of a pipeline config:\n\n```yaml\n---\nresource_types:\n- name: sonarqube-notifier\n  type: docker-image\n  source:\n    repository: lgohr/sonarqube\n    tag: latest\n```\n\n## Source configuration\n\nConfigure as follows:\n\n```yaml\n---\nresources:\n- name: my-sonarqube\n  type: sonarqube-notifier\n  source:\n    target: https://my.sonar.server\n    sonartoken: ((my-secret-token))\n    component: my:component\n    metrics: ncloc,complexity,violations,coverage\n```\n\n* `target`: *Required.* URL of your SonarQube instance e.g. `https://my-atlassian.com/sonar`.\n* `sonartoken`: *Required.* [Security token](https://docs.sonarqube.org/display/SONAR/User+Token), which is used to connect to Sonarqube.\n* `component`: *Required.* The component _key_ of your component. This is shown in the dashboard url as https://my-atlassian/sonar/dashboard?id=ComponentKey\n* `metrics`: *Required.* The metrics you want to grab. See https://docs.sonarqube.org/display/SONAR/Metric+Definitions\n\n## `in`: Get the latest result\n\nGet the latest result; write it to the local working directory (e.g.\n`/tmp/build/get`) with the filename result.json.\n\nExample response (metrics: nloc,complexity,violations,coverage)\n```json\n{\n  \"component\": {\n    \"id\": \"AWH_6osdce3G0HojaCW1\",\n    \"key\": \"my:component\",\n    \"name\": \"my-component\",\n    \"qualifier\": \"TRK\",\n    \"measures\": [\n      {\n        \"metric\": \"ncloc\",\n        \"value\": \"824\",\n        \"periods\": [\n          {\n            \"index\": 1,\n            \"value\": \"299\"\n          }\n        ]\n      },\n      {\n        \"metric\": \"complexity\",\n        \"value\": \"90\",\n        \"periods\": [\n          {\n            \"index\": 1,\n            \"value\": \"27\"\n          }\n        ]\n      },\n      {\n        \"metric\": \"violations\",\n        \"value\": \"5\",\n        \"periods\": [\n          {\n            \"index\": 1,\n            \"value\": \"-6\"\n          }\n        ]\n      },\n      {\n        \"metric\": \"coverage\",\n        \"value\": \"91.4\",\n        \"periods\": [\n          {\n            \"index\": 1,\n            \"value\": \"40.7\"\n          }\n        ]\n      }\n    ]\n  },\n  \"periods\": [\n    {\n      \"index\": 1,\n      \"mode\": \"previous_version\",\n      \"date\": \"2018-03-07T16:58:31+0100\"\n    }\n  ]\n}\n```\n\n## `out`: Nothing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felgohr%2Fconcourse-sonarqube-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felgohr%2Fconcourse-sonarqube-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felgohr%2Fconcourse-sonarqube-notifier/lists"}