This commit is contained in:
parent
fe1aa1588d
commit
c9452c518d
23
.drone.yml
23
.drone.yml
@ -3,7 +3,7 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Run SonarQube Scan
|
- name: SonarQube Scan
|
||||||
image: sonarsource/sonar-scanner-cli
|
image: sonarsource/sonar-scanner-cli
|
||||||
environment:
|
environment:
|
||||||
SONAR_HOST_URL:
|
SONAR_HOST_URL:
|
||||||
@ -15,21 +15,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- mkdir -p /tmp/.scannerwork
|
- mkdir -p /tmp/.scannerwork
|
||||||
- chmod -R 777 /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
|
||||||
sonar-scanner
|
|
||||||
-Dsonar.login=$SONAR_LOGIN
|
|
||||||
-Dsonar.token=$SONAR_TOKEN
|
|
||||||
-Dsonar.host.url=$SONAR_HOST_URL
|
|
||||||
-Dsonar.projectKey=crud_app
|
|
||||||
-Dsonar.projectName=crud_app
|
|
||||||
-Dsonar.working.directory=/tmp/.scannerwork
|
|
||||||
-Dsonar.modules=frontend,employee-service
|
|
||||||
-Dfrontend.sonar.projectBaseDir=frontend
|
|
||||||
-Dfrontend.sonar.sources=src
|
|
||||||
-Dfrontend.sonar.exclusions=**/node_modules/**
|
|
||||||
-Demployee-service.sonar.projectBaseDir=employee-service
|
|
||||||
-Demployee-service.sonar.sources=src/main/java
|
|
||||||
-Demployee-service.sonar.exclusions=**/*.class # ป้องกันไม่ให้ Scan ไฟล์ .class
|
|
||||||
|
|
||||||
- name: Deploy to Server
|
- name: Deploy to Server
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
@ -39,7 +25,4 @@ steps:
|
|||||||
WEBHOOK_SECRET:
|
WEBHOOK_SECRET:
|
||||||
from_secret: WEBHOOK_SECRET
|
from_secret: WEBHOOK_SECRET
|
||||||
commands:
|
commands:
|
||||||
- >
|
- 'curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $WEBHOOK_SECRET" -d "{\"branch\":\"master\"}" "$WEBHOOK_URL"'
|
||||||
curl -X POST -H "Content-Type: application/json"
|
|
||||||
-H "Authorization: Bearer $WEBHOOK_SECRET"
|
|
||||||
-d "{\"branch\":\"master\"}" "$WEBHOOK_URL"
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user