Browse Source

更新 '.drone.yml'

gogs 1 year ago
parent
commit
402deeb9c1
1 changed files with 31 additions and 8 deletions
  1. 31 8
      .drone.yml

+ 31 - 8
.drone.yml

@@ -246,6 +246,16 @@ steps:
 #      - develop
 ##################################### NOTIFY ####################################
 
+---
+kind: pipeline
+type: docker
+name: notify
+
+# 以下内容不再需要clone代码
+clone:
+  disable: true
+  
+  
 - name: 钉钉通知
   image: guoxudongdocker/drone-dingtalk
   settings:
@@ -263,13 +273,23 @@ steps:
     success_pic: http://82.157.141.169:16666/avatars/1
     msg_at_mobiles: 15858193327
     
-#- name: email-notify
-#  image: drillster/drone-email
-#  settings:
-#    host: smtp.some-server.com
-#    username: foo
-#    password: bar
-#    from: drone@your-domain.com    
+- name: email-notify
+  image: drillster/drone-email
+  settings:
+    # true 只发送给指定邮件收件人  false: 只发给流水线触发人
+    recipients_only: true
+    recipients:
+      from_secret: email_sender
+    subject: "Drone build: [{{ build.status }}] {{ repo.name }} ({{ repo.branch }}) #{{ build.number }}"
+    host: smtp.qq.com
+    port: 465
+    username: 
+      from_secret: email_sender
+    password: 
+      from_secret: email_pwd
+    from: 
+      from_secret: email_sender
+    
     
 - name: wechat notify
   image: lizheming/drone-wechat
@@ -331,4 +351,7 @@ trigger:
   branch:
   - master    
   event:
-  - push
+  - push
+  
+# 构建完了在执行通知
+depends_on: [default]