kind: pipeline
type: docker

trigger:
  event:
    - push

steps:
  - name: sonar
    image: sonarsource/sonar-scanner-cli:5
    commands:
      - sonar-scanner -Dsonar.projectKey=MuscuMaths -Dsonar.sources=. -Dsonar.login=$${PLUGIN_SONAR_TOKEN} -Dsonar.host.url=$${PLUGIN_SONAR_HOST} -Dsonar.php.coverage.reportPaths=coverage.xml
    settings:
      sonar_host:
        from_secret: sonar_host
      sonar_token:
        from_secret: sonar_token