version: '{build}'

image: Visual Studio 2017

environment:
  LIBRARY_VERSION: '2.3.0'
  SONAR_LOGIN:
    secure: JNopXLZtkO5PD8yEj2+W1BZnbhq9oegXmTFgvVWQw67z5PtWwd+ngjv5O7xFetCZ

install:
  - ps: dotnet tool install --global dotnet-sonarscanner

test: off

before_build:
  - ps: dotnet sonarscanner begin /k:"rosolko_WebDriverManager.Net" /v:$env:LIBRARY_VERSION /d:sonar.organization="rosolko-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=$env:SONAR_LOGIN /d:sonar.language="cs" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /d:sonar.coverage.exclusions="WebDriverManager.Tests/**,**/*Tests.cs" /d:sonar.cs.opencover.reportsPaths="C:\projects\webdrivermanager-net\WebDriverManager.Tests\opencover.xml"

build_script:
  - ps: dotnet restore
  - ps: dotnet build
  - ps: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="opencover.xml"

after_build:
  - ps: dotnet sonarscanner end /d:sonar.login=$env:SONAR_LOGIN

artifacts:
  - path: '**\*.nupkg'
version: '{build}'

image: Visual Studio 2017

environment:
  LIBRARY_VERSION: '2.3.0'
  SONAR_LOGIN:
    secure: JNopXLZtkO5PD8yEj2+W1BZnbhq9oegXmTFgvVWQw67z5PtWwd+ngjv5O7xFetCZ

install:
  - ps: dotnet tool install --global dotnet-sonarscanner

test: off

before_build:
  - ps: dotnet sonarscanner begin /k:"rosolko_WebDriverManager.Net" /v:$env:LIBRARY_VERSION /o:"rosolko-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=$env:SONAR_LOGIN /d:sonar.language="cs" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /d:sonar.coverage.exclusions="WebDriverManager.Tests/**,**/*Tests.cs" /d:sonar.cs.opencover.reportsPaths="C:\projects\webdrivermanager-net\WebDriverManager.Tests\opencover.xml"

build_script:
  - ps: dotnet restore
  - ps: dotnet build
  - ps: dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="opencover.xml"

after_build:
  - ps: dotnet sonarscanner end /d:sonar.login=$env:SONAR_LOGIN

artifacts:
  - path: '**\*.nupkg'
Use the parameter prefix '/o:' to define the organization of the SonarQube project instead of injecting this organization with the help of the 'sonar.organization' property
Use the parameter prefix '/o:' to define the organization of the SonarQube project instead of injecting this organization with the help of the 'sonar.organization' property
