From 2641d161f7b6dbecf1fd96be9a1fe2ff40bc3946 Mon Sep 17 00:00:00 2001 From: Flook Date: Thu, 17 Apr 2025 04:24:03 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=97=E0=B8=94=E0=B8=AA=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=20CI/CD=20=E0=B9=81=E0=B8=A5=E0=B8=B0=20Scan=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 16 ++++++++++++++-- src/App.jsx | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9a62087..6f82fae 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,6 +3,20 @@ type: docker name: default steps: + - name: SonarQube Scan + image: sonarsource/sonar-scanner-cli + environment: + SONAR_HOST_URL: + from_secret: SCANNER_HOST_URL + SONAR_LOGIN: + from_secret: SCANNER_LOGIN + SONAR_TOKEN: + from_secret: SCANNER_TOKEN + commands: + - mkdir -p /tmp/.scannerwork + - chmod -R 777 /tmp/.scannerwork + - sonar-scanner -Dsonar.projectKey=gitea_opengis -Dsonar.login=$SONAR_LOGIN -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN -Dsonar.working.directory=/tmp/.scannerwork + - name: Deploy to Server image: curlimages/curl:latest environment: @@ -10,7 +24,5 @@ steps: from_secret: WEBHOOK_URL WEBHOOK_SECRET: from_secret: WEBHOOK_SECRET - BRANCH: - from_secret: BRANCH commands: - 'curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $WEBHOOK_SECRET" -d "{\"branch\":\"master\"}" "$WEBHOOK_URL"' diff --git a/src/App.jsx b/src/App.jsx index 2890d4a..13c0e3c 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,7 +2,7 @@ function App() { return ( <> -

สวัสดีครับ

+

สวัสดี ทดสอบ Scan Code ก่อน Deploy สำเร็จครับ

)