drone init

This commit is contained in:
lizheming
2018-11-25 10:25:25 +08:00
parent 009655fcfe
commit 1ee57a206a
+56
View File
@@ -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