2024-05-10 10:59:14 +08:00
|
|
|
steps:
|
|
|
|
- name: build
|
2024-05-10 11:04:11 +08:00
|
|
|
image: golang:1.21.6
|
2024-05-10 10:59:14 +08:00
|
|
|
commands:
|
2024-05-10 11:33:26 +08:00
|
|
|
- go mod tidy
|
2024-05-10 11:31:01 +08:00
|
|
|
- go mod download
|
2024-05-10 11:24:36 +08:00
|
|
|
- go build -o md-view-go
|
2024-05-10 10:59:14 +08:00
|
|
|
|
|
|
|
- name: docker
|
2024-05-10 11:04:11 +08:00
|
|
|
image: plugins/docker:20.17.3
|
2024-05-10 10:59:14 +08:00
|
|
|
settings:
|
|
|
|
repo: omv.lll.net:5000/lianglianglee/md-view-go
|
|
|
|
registry: omv.lll.net:5000
|
|
|
|
insecure: true
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${CI_PREV_PIPELINE_CREATED}
|
2024-05-11 10:35:16 +08:00
|
|
|
|
|
|
|
- name: deploy
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
- blog.lll.net
|
|
|
|
username: root
|
|
|
|
password:
|
|
|
|
from_secret: ssh_password
|
2024-07-24 14:36:17 +08:00
|
|
|
port: 22
|
2024-05-11 10:35:16 +08:00
|
|
|
command_timeout: 2m
|
|
|
|
script:
|
2024-07-24 14:36:17 +08:00
|
|
|
- cd /root/docker-compose/md-view/
|
2024-05-11 10:35:16 +08:00
|
|
|
- docker pull docker.lianglianglee.com/lianglianglee/md-view-go:latest
|
|
|
|
- docker compose down && docker compose up -d
|
|
|
|
when:
|
|
|
|
- environment: production
|
2024-05-11 10:39:15 +08:00
|
|
|
- event: deployment
|