chore: add Drone CI/CD, docker-compose, deploy script and update Dockerfile to Java 21

This commit is contained in:
mediabot-pt
2026-06-29 10:49:09 +08:00
parent baa04b5138
commit 5b86621f81
5 changed files with 150 additions and 2 deletions

50
.drone.yml Normal file
View File

@@ -0,0 +1,50 @@
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
event:
- push
steps:
- name: maven-package
image: maven:3-eclipse-temurin-21-alpine
volumes:
- name: maven-cache
path: /root/.m2
commands:
- mvn clean package -DskipTests -B
- name: docker-build-and-push
image: plugins/docker
settings:
registry: 192.168.31.253
repo: 192.168.31.253/yescent/par
tags: latest
dockerfile: par-api/Dockerfile
username:
from_secret: harbor_username
password:
from_secret: harbor_password
- name: deploy
image: appleboy/drone-ssh
settings:
host: 192.168.31.252
username:
from_secret: ssh_username
password:
from_secret: ssh_password
port: 22
script:
- cd /data/par
- ./deploy.sh
command_timeout: 2m
timeout: 2m
volumes:
- name: maven-cache
host:
path: /tmp/drone/cache/maven