From 2234e74ac931b362451bb02c7c26f62e73567f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 10:12:35 +0100 Subject: [PATCH 1/6] Ajouter '.drone.yml' --- .drone.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..0904987 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,15 @@ +kind: pipeline +type: docker +name: LeftOvers + +trigger: + event: + - push + +steps: + - name: app-build + image: node:latest + commands: + - cd ./LeftOvers + - npm install + - npm run \ No newline at end of file -- 2.36.3 From 1a9bf3ae760e3482a966267dda33b09c2e22a9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 10:38:36 +0100 Subject: [PATCH 2/6] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0904987..deab944 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,6 +10,6 @@ steps: - name: app-build image: node:latest commands: - - cd ./LeftOvers + - cd ./LeftOvers/ - npm install - npm run \ No newline at end of file -- 2.36.3 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 3/6] =?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 -- 2.36.3 From 03a8191bd1c0cb2b445e4735b95beb362111ab52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 10:52:56 +0100 Subject: [PATCH 4/6] =?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 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9394952..87027ba 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,14 +22,9 @@ steps: 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 + export SONAR_SCANNER_VERSION=4.7.0.2747 + export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux + curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip + unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ + export PATH=$SONAR_SCANNER_HOME/bin:$PATH + export SONAR_SCANNER_OPTS="-server" \ No newline at end of file -- 2.36.3 From 9f92f9a60b738aa9417e1afb3b503671d783732a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 10:54:58 +0100 Subject: [PATCH 5/6] =?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 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 87027ba..a5ed1db 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,9 +22,11 @@ steps: settings: sources: ./LeftOvers/ commands: - export SONAR_SCANNER_VERSION=4.7.0.2747 - export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux - curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ - export PATH=$SONAR_SCANNER_HOME/bin:$PATH - export SONAR_SCANNER_OPTS="-server" \ No newline at end of file + - export SONAR_SCANNER_VERSION=4.7.0.2747 + - export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux + - curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip + - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ + - export PATH=$SONAR_SCANNER_HOME/bin:$PATH + - export SONAR_SCANNER_OPTS="-server" + - sonar-scanner -D sonar.projectKey=FLAD -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar + depends_on: [ app-build ] \ No newline at end of file -- 2.36.3 From 60694ef7d9b73303101de583139fd524dbbae557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rayh=C3=A2n=20HASSOU?= Date: Thu, 16 Nov 2023 11:00:07 +0100 Subject: [PATCH 6/6] =?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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a5ed1db..a4fc85b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,5 +28,5 @@ steps: - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ - export PATH=$SONAR_SCANNER_HOME/bin:$PATH - export SONAR_SCANNER_OPTS="-server" - - sonar-scanner -D sonar.projectKey=FLAD -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar + - sonar-scanner -D sonar.projectKey=LeftOvers -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar depends_on: [ app-build ] \ No newline at end of file -- 2.36.3