添加自动发布流程
This commit is contained in:
parent
d496491479
commit
d791681c1d
|
@ -0,0 +1,64 @@
|
|||
kind: pipeline
|
||||
name: "发布micro-php-nacos"
|
||||
type: docker
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
node:
|
||||
runner: localagent
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/.composer
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
branch:
|
||||
- master
|
||||
|
||||
steps:
|
||||
- name: "安装依赖"
|
||||
image: annon/docker-composer:0.1
|
||||
pull: if-not-exists
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /root/.composer
|
||||
commands:
|
||||
# 使用阿里云源
|
||||
- "composer config repo.packagist composer https://mirrors.aliyun.com/composer/"
|
||||
# 安装依赖包
|
||||
- "composer install"
|
||||
|
||||
- name: "构建Docker镜像"
|
||||
image: plugins/docker
|
||||
pull: if-not-exists
|
||||
settings:
|
||||
mirror: https://dockerpull.com
|
||||
registry: anxan-docker.pkg.coding.net
|
||||
username:
|
||||
from_secret: hub_name
|
||||
password:
|
||||
from_secret: hub_password
|
||||
repo: anxan-docker.pkg.coding.net/d/repo/micro-php-nacos
|
||||
tags: "0.0.5"
|
||||
|
||||
- name: "完成通知"
|
||||
image: anxan-docker.pkg.coding.net/d/repo/drone-email-notify:1.0
|
||||
pull: always
|
||||
environment:
|
||||
EMAIL_HOST:
|
||||
from_secret: email_host
|
||||
EMAIL_PASS:
|
||||
from_secret: email_pass
|
||||
EMAIL_NAME:
|
||||
from_secret: email_name
|
||||
EMAIL_PORT:
|
||||
from_secret: email_port
|
||||
EMAIL_FROM:
|
||||
from_secret: email_from
|
||||
EMAIL_TO:
|
||||
from_secret: email_to
|
Loading…
Reference in New Issue