cathive / concourse-sonarqube-resource

performs SonarQube analyses and checks quality gates https://concourse-ci.org/ https://sonarqube.org/
Apache License 2.0
46 stars 50 forks source link

Fix to the parsing of additional_properties #18

Closed pontusarfwedson closed 6 years ago

pontusarfwedson commented 6 years ago

PR that now properly handles the additional_properties part of the payload. Before this PR, the part parsing out the additional properties would only take the first one (if 2 were sent in). Now works well for analyzing golang code in the out repo including coverage.xml, report.xml and tests.xml when used as:

  - put: code-analysis
    params:
      project_path: out
      project_key: ((repo)):((branch))
      sources: "."
      additional_properties:
        sonar.inclusions: "**/**.go"
        sonar.projectName: ((repo))

Also removed the requirement on sonar.login seeing as you can have a SonarQube instance which does not require this (for example if you run the default deployment in a k8s cluster).

headcr4sh commented 6 years ago

Thanks for the PR!!

Would you mind squasing them all into one? (merging in 10 commits to change 2 files and just a few lines seems a bit overkill)

pontusarfwedson commented 6 years ago

Alright, now only one squashed commit :)

headcr4sh commented 6 years ago

Looks good now. Some adjustments are still necessary un assets/common.sh to make sure that the username/login token can be omitted. I am merging this PR nevertheless.... ;-)