This commit is contained in:
parent
dd2aef016c
commit
26c0cf6c28
@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.env
|
||||
35
.drone.yml
35
.drone.yml
@ -1,9 +1,36 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: test-pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: say-hello
|
||||
image: alpine
|
||||
- name: Install dependencies
|
||||
image: node:18-alpine
|
||||
commands:
|
||||
- echo "Hello from Drone CI!"
|
||||
- npm ci
|
||||
|
||||
- name: Build
|
||||
image: node:18-alpine
|
||||
commands:
|
||||
- npm run build
|
||||
|
||||
- name: Build Docker Image
|
||||
image: docker:latest
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: DOCKER_USERNAME
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: DOCKER_PASSWORD
|
||||
commands:
|
||||
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
||||
- docker build -t adminsoftwarecraft/opengis:latest .
|
||||
- docker push adminsoftwarecraft/opengis:latest
|
||||
|
||||
- name: Deploy to Server
|
||||
image: curlimages/curl:latest
|
||||
environment:
|
||||
WEBHOOK_URL:
|
||||
from_secret: WEBHOOK_URL
|
||||
WEBHOOK_SECRET:
|
||||
from_secret: WEBHOOK_SECRET
|
||||
commands:
|
||||
- 'curl -X POST "$WEBHOOK_URL" -H "Authorization: Bearer $WEBHOOK_SECRET"'
|
||||
|
||||
@ -2,7 +2,7 @@ function App() {
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-screen py-2">
|
||||
<h1 className="text-3xl font-bold underline text-center">สวัสดี! การ Deploy อัตโนมัติสำเร็จ</h1>
|
||||
<h1 className="text-3xl font-bold underline text-center">สวัสดี! CI/CD อัตโนมัติสำเร็จ</h1>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user