From ee11d25fc637d27a611efed3e7b33ca2563b6e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 10:49:08 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'.drone.yml'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index deab944..9394952 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,4 +12,24 @@ steps: commands: - cd ./LeftOvers/ - npm install - - npm run \ No newline at end of file + - npm run + + - name: code-analysis + image: node:latest + environment: + SONAR_TOKEN: + from_secret: SONAR_TOKEN + settings: + sources: ./LeftOvers/ + commands: + $env:SONAR_SCANNER_VERSION = "4.7.0.2747" + $env:SONAR_DIRECTORY = [System.IO.Path]::Combine($(get-location).Path,".sonar") + $env:SONAR_SCANNER_HOME = "$env:SONAR_DIRECTORY/sonar-scanner-$env:SONAR_SCANNER_VERSION-windows" + rm $env:SONAR_SCANNER_HOME -Force -Recurse -ErrorAction SilentlyContinue + New-Item -path $env:SONAR_SCANNER_HOME -type directory + (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$env:SONAR_SCANNER_VERSION-windows.zip", "$env:SONAR_DIRECTORY/sonar-scanner.zip") + Add-Type -AssemblyName System.IO.Compression.FileSystem + [System.IO.Compression.ZipFile]::ExtractToDirectory("$env:SONAR_DIRECTORY/sonar-scanner.zip", "$env:SONAR_DIRECTORY") + rm ./.sonar/sonar-scanner.zip -Force -ErrorAction SilentlyContinue + $env:Path += ";$env:SONAR_SCANNER_HOME/bin" + $env:SONAR_SCANNER_OPTS="-server" \ No newline at end of file