You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB
YAML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

kind: pipeline
type: docker
name: BuildDev
trigger:
event: [push]
branch: [ master ]
steps:
- name: BuildToRegistry
image: plugins/docker
settings:
registry: registry.cn-hangzhou.aliyuncs.com
repo: registry.cn-hangzhou.aliyuncs.com/hyxc_dev/scale_manager
username:
from_secret: registry_username
password:
from_secret: registry_password
use_cache: true
# event为push且分支为master的时候自动打latest为tag则会根据tag自动生成
tag:
- latest
- sha_${DRONE_COMMIT_SHA}
when:
status:
- "success"
---
kind: pipeline
type: docker
name: BuildProd
trigger:
event: [tag]
steps:
- name: BuildToRegistry
image: plugins/docker
# depends_on:
# - CheckCode
settings:
registry: registry.cn-hangzhou.aliyuncs.com
repo: registry.cn-hangzhou.aliyuncs.com/hyxc/scale_manager
username:
from_secret: registry_username
password:
from_secret: registry_password
use_cache: true
# event为push且分支为master的时候自动打latest为tag则会根据tag自动生成
auto_tag: true
when:
status:
- "success"