2022-06-15 10:31:40 +08:00
|
|
|
|
kind: pipeline
|
|
|
|
|
type: docker
|
|
|
|
|
name: BuildDev
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
event: [push]
|
|
|
|
|
branch: [ master ]
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: BuildToRegistry
|
|
|
|
|
image: plugins/docker
|
|
|
|
|
settings:
|
2022-06-16 22:28:54 +08:00
|
|
|
|
registry: docker.echol.cn
|
|
|
|
|
repo: docker.echol.cn/drone_docker/drone-test
|
2022-06-15 10:31:40 +08:00
|
|
|
|
username:
|
2022-06-16 22:28:54 +08:00
|
|
|
|
from_secret: harbor_user
|
2022-06-15 10:31:40 +08:00
|
|
|
|
password:
|
2022-06-16 22:28:54 +08:00
|
|
|
|
from_secret: harbor_pwd
|
2022-06-15 10:31:40 +08:00
|
|
|
|
use_cache: true
|
|
|
|
|
# event为push且分支为master的时候,自动打latest,为tag则会根据tag自动生成
|
|
|
|
|
tag:
|
|
|
|
|
- latest
|
|
|
|
|
- sha_${DRONE_COMMIT_SHA}
|
2022-06-15 15:05:38 +08:00
|
|
|
|
when:
|
|
|
|
|
status:
|
|
|
|
|
- "success"
|
2022-06-16 18:17:58 +08:00
|
|
|
|
- echo hello
|
|
|
|
|
- echo world
|