From 7d33a45c3d98162f1f09768c63e1fda4819d82a1 Mon Sep 17 00:00:00 2001 From: Ruan Bekker Date: Tue, 30 Apr 2019 13:36:36 +0200 Subject: [PATCH] Update .drone.yml --- .drone.yml | 110 +++++++++++++++-------------------------------------- 1 file changed, 30 insertions(+), 80 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7ab2dd0..2ffef63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,82 +1,32 @@ -kind: pipeline -name: default +pipeline: + run_golang: + group: build + image: golang + commands: + - go build + - go test + + run_bash: + group: build + image: alpine + commands: + - echo "running env command" + - env -steps: -- name: test - image: alpine - environment: - MYUSERNAME: - from_secret: myusername - commands: - - echo "run env command" - -- name: ssh - image: appleboy/drone-ssh - pull: true - settings: - username: root - port: 22 - host: - from_secret: ssh_host - key: - from_secret: ssh_key - volumes: - - /root:/tmp/ssh - script: - - pwd - - ls -lah - - ls /tmp/ssh/ - - find / -name Dockerfile - - docker node ls - -#- name: slack -# image: plugins/slack -# settings: -# webhook: -# from_secret: slack_webhook -# channel: system_events -# username: drone -# icon_url: https://cdn.shopify.com/s/files/1/1061/1924/products/Virus_Emoji_large.png?v=1480481048 -# template: > -# {{#success build.status}} -# build {{build.number}} status: *{{build.status}}* -# build link: {{build.link}} -# build author: {{build.author}} -# build ref: {{build.ref}} -# build event: {{build.event}} -# build commit: {{build.commit}} -# build branch: {{build.branch}} -# build deploy: {{build.deployTo}} -# {{else}} -# build {{build.number}} failed. Fix me please. -# {{/success}} - -- name: notify-email - image: drillster/drone-email - settings: - from: - from_secret: smtp_from - host: smtp.sendgrid.net - port: 587 - skip_verify: true - secrets: [ email_recipients, email_username, email_password ] - subject: > - [DRONE CI]: {{ build.status }}: {{ repo.owner }}/{{ repo.name }} - ({{ build.branch }} - {{ truncate build.commit 8 }}) + slack: + image: plugins/slack + webhook: + from_secret: slack_webhook + channel: system_events + link_names: true + icon_url: https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/320/microsoft/153/police-cars-revolving-light_1f6a8.png when: - status: [ changed, failure ] - -#- name: telegram -# image: appleboy/drone-telegram -# settings: -# token: -# from_secret: telegram_token -# to: -# from_secret: telegram_to -# when: -# status: [ success, failure ] -# photo: -# - https://cdn.shopify.com/s/files/1/1061/1924/products/Virus_Emoji_large.png?v=1480481048 -# format: markdown - - + status: [ success, failure ] + template: > + {{#success build.status}} + build {{build.number}} status: *{{uppercase build.status}}* + by: {{lowercase build.author}} + more info: {{build.link}} + {{else}} + build {{build.number}} failed. Fix me please. + {{/success}}