ทดสอบ CI/CD และ Scan Code
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c3adcf76fe
commit
2641d161f7
16
.drone.yml
16
.drone.yml
@ -3,6 +3,20 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
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
|
- name: Deploy to Server
|
||||||
image: curlimages/curl:latest
|
image: curlimages/curl:latest
|
||||||
environment:
|
environment:
|
||||||
@ -10,7 +24,5 @@ steps:
|
|||||||
from_secret: WEBHOOK_URL
|
from_secret: WEBHOOK_URL
|
||||||
WEBHOOK_SECRET:
|
WEBHOOK_SECRET:
|
||||||
from_secret: WEBHOOK_SECRET
|
from_secret: WEBHOOK_SECRET
|
||||||
BRANCH:
|
|
||||||
from_secret: BRANCH
|
|
||||||
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"'
|
||||||
|
|||||||
@ -2,7 +2,7 @@ function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h1 className={"text-lg"}>สวัสดีครับ</h1>
|
<h1 className={"text-lg"}>สวัสดี ทดสอบ Scan Code ก่อน Deploy สำเร็จครับ</h1>
|
||||||
<button className="btn btn-neutral">Neutral</button>
|
<button className="btn btn-neutral">Neutral</button>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user