Files
plugin-drone-wechat2/.drone.yml
T
2018-12-10 10:09:51 +08:00

71 lines
1.6 KiB
YAML

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: node:lts-alpine
commands:
- npm set config package-lock false
- npm install --registry=https://registry.npm.taobao.org
- npm run eslint && npm run test-cov -- --reporter=text-lcov > ./lcov.info
- name: coveralls
image: lizheming/drone-coveralls
environment:
COVERALLS_REPO_TOKEN:
from_secret: coveralls_token
settings:
debug: true
files:
- ./lcov.info
- name: code analysis
image: aosapps/drone-sonar-plugin
environment:
sonar_host: "https://sonar.eming.li"
sonar_token:
from_secret: sonar_token
- 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
settings:
title: "构建通知"
corpid:
from_secret: corpid
corp_secret:
from_secret: corp_secret
agent_id:
from_secret: agent_id
msg_url: "${DRONE_SYSTEM_HOST}/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}/${DRONE_BUILD_NUMBER}"
message: >
{% if success %}
😊主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建成功!
{% else %}
😭主人,{{repo.owner}}/{{repo.name}}第{{build.number}}次构建失败了,快来修理下吧。
{% endif %}
volumes:
- name: cache
host:
path: /tmp/cache