This commit is contained in:
parent
afcbb7d487
commit
fe1aa1588d
15
.drone.yml
15
.drone.yml
@ -3,19 +3,6 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build Backend (Spring Boot)
|
|
||||||
image: maven:3.9-eclipse-temurin-21
|
|
||||||
commands:
|
|
||||||
- cd employee-service
|
|
||||||
- mvn clean install -DskipTests # ใช้ mvn clean install แทน mvn clean package เพื่อสร้างไฟล์ .class
|
|
||||||
|
|
||||||
- name: Build Frontend (React)
|
|
||||||
image: node:20-alpine
|
|
||||||
commands:
|
|
||||||
- cd frontend
|
|
||||||
- npm install
|
|
||||||
- npm run build
|
|
||||||
|
|
||||||
- name: Run SonarQube Scan
|
- name: Run SonarQube Scan
|
||||||
image: sonarsource/sonar-scanner-cli
|
image: sonarsource/sonar-scanner-cli
|
||||||
environment:
|
environment:
|
||||||
@ -42,7 +29,7 @@ steps:
|
|||||||
-Dfrontend.sonar.exclusions=**/node_modules/**
|
-Dfrontend.sonar.exclusions=**/node_modules/**
|
||||||
-Demployee-service.sonar.projectBaseDir=employee-service
|
-Demployee-service.sonar.projectBaseDir=employee-service
|
||||||
-Demployee-service.sonar.sources=src/main/java
|
-Demployee-service.sonar.sources=src/main/java
|
||||||
-Demployee-service.sonar.java.binaries=employee-service/target/classes # เส้นทางของ .class ต้องตรงกับที่สร้างจากการคอมไพล์
|
-Demployee-service.sonar.exclusions=**/*.class # ป้องกันไม่ให้ Scan ไฟล์ .class
|
||||||
|
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user