update
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
liupeng 2024-02-28 12:36:34 +08:00
parent 357c4baae9
commit 6a0af0b46f
2 changed files with 94 additions and 6 deletions

View File

@ -1,7 +1,95 @@
kind: pipeline
type: docker
name: default
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_GIT_USERNAME=liupeng
- DRONE_GIT_PASSWORD=Newbie76
clone:
depth: 10
steps:
# 开发版
- name: docker-${DRONE_BRANCH}
image: plugins/docker:18.09
settings:
username: liupeng
password:
from_secret: DOCKER_PASSWORD
registry: git.daymele.com
repo: git.daymele.com/liupeng/drone
insecure: true
debug: true
dockerfile: Dockerfile
tags:
- canary
when:
branch:
- master
- dev
event:
- push
# 稳定版
- name: docker-release
image: plugins/docker:18.09
settings:
username: liupeng
password:
from_secret: DOCKER_PASSWORD
registry: git.daymele.com
repo: git.daymele.com/liupeng/drone
insecure: true
dockerfile: Dockerfile
tags:
- ${DRONE_TAG}
- latest
when:
event:
- tag
- name: deploy-${DRONE_BRANCH}
image: appleboy/drone-ssh
settings:
host:
- dev.daymele.com
username: liup
password:
from_secret: HOST_PASSWORD
port: 22
command_timeout: 2m
script:
- echo "deploy ssh!"
- name=test-demo
- image=git.daymele.com/liupeng/drone:canary
- echo ${DRONE_BRANCH}
- docker pull $image
- docker rm -f test-demo || true
- docker image prune -f
- docker run --name=$name -d -p 8001:9000 $image
when:
branch:
- master
- dev
event:
- push
- name: deploy-release
image: appleboy/drone-ssh
settings:
host:
- dev.daymele.com
username: liuo
password:
from_secret: HOST_PASSWORD
port: 22
command_timeout: 2m
script:
- echo "deploy ssh!"
- name=demo-test
- image=git.daymele.com/liupeng/drone::latest
- docker pull $image
- docker rm -f test-demo || true
- docker image prune -f
- docker run --name=$name -d -p 8001:9000 $image
when:
event:
- tag

View File

@ -30,8 +30,8 @@ ADD zoneinfo.tar.gz /
# && echo "Asia/Shanghai" > /etc/timezone \
# && apk del tzdata \
# && rm -rf /var/cache/apk/*
ENTRYPOINT ["/adapt","-port","7000","-conf","/conf/daymele.conf"]
EXPOSE 7000
ENTRYPOINT ["/adapt","-port","9000","-conf","/conf/daymele.conf"]
EXPOSE 9000
# docker image prune 删除悬虚镜像
# docker run --name res -d -p 7000:7011 -v /mnt/resdata:/data dev.daymele.com:5000/res --restart always