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

78 lines
2.0 KiB

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: master
steps:
# - name: restore-cache
# image: meltwater/drone-cache
# settings:
# backend: filesystem
# restore: true
# cache_key: "maven"
# archive_format: gzip
# filesystem_cache_root: "/var/lib/cache"
# mount:
# - "maven"
# volumes:
# - name: cache
# path: "/var/lib/cache"
# Do stuff..
- name: build
image: maven:3.8-openjdk-8
commands:
- mvn clean package
- name: build-docker-image
image: plugins/docker
settings:
repo: 192.168.230.38:8888/zabbix/back:latest
registry: 192.168.230.38:8888
username:
from_secret: harbor_user
password:
from_secret: harbor_psw
dockerfile: Dockerfile
insecure: true
tags: latest
# - name: rebuild-cache
# image: meltwater/drone-cache
# settings:
# backend: filesystem
# rebuild: true
# cache_key: "maven"
# archive_format: gzip
# filesystem_cache_root: "/var/lib/cache"
# mount:
# - "maven"
# volumes:
# - name: cache
# path: "/var/lib/cache"
# - name: notify
# pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
# image: drillster/drone-email
# settings:
# recipients_only: true # 只发送给指定邮件收件人,不默认发送给流水线创建人
# host: smtp.qq.com #SMTP服务器 例如 smtp.qq.com
# port: 465 #SMTP服务端口 例如QQ邮箱端口465
# subject: "Drone Build Complete!" # 邮件主题内容
# username: #邮箱用户名
# from_secret: qqmail_username
# password: #邮箱密码
# from_secret: qqmail_pwd
# from:
# from_secret: qqmail_username
# recipients: #收件人
# from_secret: email_recipients # 格式xxxx,xxxx
# when: #执行条件
# status:
# - success
# - changed
# - failure
trigger:
branch:
- master
event:
- push
- merge