Licensed under the MIT license
Acceptance tests require local Db as well as Azure Functions Core tools. Use NPM command to install them globally:
npm i -g azure-functions-core-tools@3 --unsafe-perm true
SonarCloud analysis can be performed using a docker container which can be built from the included dockerfile.
Docker must be running Windows containers in this instance
An example of the docker run command to analyse the code base can be found below.
For this docker container to be successfully created you will need:
- docker running Windows containers
- a user on SonarCloud.io with permission to run analysis
- a SonarQube.Analysis.xml file in the root of the git repository.
This file takes the format:
<SonarQubeAnalysisProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sonarsource.com/msbuild/integration/2015/1">
<Property Name="sonar.host.url">https://sonarcloud.io</Property>
<Property Name="sonar.login">[Your SonarCloud user token]</Property>
</SonarQubeAnalysisProperties>
docker run [OPTIONS] IMAGE COMMAND
docker run --rm -v c:/projects/das-assessor-service:c:/projects/das-assessor-service -w c:/projects/das-assessor-service 3d9151a444b2 powershell -F c:/projects/das-assessor-service/sonarcloud/analyse.ps1
Option | Description |
---|---|
--rm | Remove any existing containers for this image |
-v | Bind the current directory of the host to the given directory in the container ($PWD may be different on your platform). This should be the folder where the code to be analysed is |
-w | Set the working directory |
Execute the analyse.ps1 PowerShell script