mirror of
https://github.com/lizheming/drone-wechat.git
synced 2026-06-04 18:33:46 +08:00
drone init
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
kind: pipline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: restore-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
|
||||
- name: build
|
||||
image: mhart/alpine-node:8
|
||||
commands:
|
||||
- npm install --registry=https://registry.npm.taobao.org
|
||||
- npm test
|
||||
|
||||
- name: rebuild-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- ./node_modules
|
||||
|
||||
- name: wechat
|
||||
image: lizheming/drone-wechat
|
||||
pull: always
|
||||
environment:
|
||||
corpid:
|
||||
from_secret: corpid
|
||||
corp_secret:
|
||||
from_secret: corp_secret
|
||||
agent_id:
|
||||
from_secret: agent_id
|
||||
settings:
|
||||
title: "Drone Notification"
|
||||
corpid: ${corpid}
|
||||
corp_secret: ${corp_secret}
|
||||
agent_id: ${agent_id}
|
||||
message: >
|
||||
{% if success %}
|
||||
😊主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建成功!
|
||||
{% else %}
|
||||
😭主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建失败了,快来修理下吧。
|
||||
{% endif %}
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/cache
|
||||
Reference in New Issue
Block a user