README.md 1 KB
Newer Older
fredix's avatar
fredix committed
1
2
# drone-gotify

fredix's avatar
fredix committed
3
4
5
## documentations

https://gotify.net/docs/more-pushmsg#golang  
fredix's avatar
fredix committed
6
https://docs.drone.io/plugins/golang/
fredix's avatar
fredix committed
7
8

## environment variables :
fredix's avatar
fredix committed
9
       
fredix's avatar
fredix committed
10
```
fredix's avatar
fredix committed
11
PLUGIN_GOTIFY_ENDPOINT="https://gotify.server.tld"
fredix's avatar
fredix committed
12
PLUGIN_GOTIFY_TOKEN="GOTIFY_APPLICATION_TOKEN"
fredix's avatar
fredix committed
13
PLUGIN_GOTIFY_TITLE="from drone-gotify"
fredix's avatar
fredix committed
14
PLUGIN_MESSAGE="test"          
fredix's avatar
fredix committed
15
16
PLUGIN_GOTIFY_PRIORITY="5"     
```
fredix's avatar
fredix committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Example in a .drone.yml

```
- name: gotify
  image: fredix/arm64v8-alpine-drone-gotify
  settings:
    gotifytoken:
      from_secret: plugin_gotifytoken
    gotifyendpoint:
      from_secret: plugin_gotifyendpoint
    gotifytitle:
      from_secret: plugin_gotifytitle
    gotifypriority:
      from_secret: plugin_gotifypriority
    message: >
      {{#success build.status}}
        build {{build.number}} succeeded on {{repo.name}}. Good job {{build.author}}  {{build.link}}
      {{else}}
        build {{build.number}} failed on {{repo.name}}. Fix me please {{build.author}}  {{build.link}}
      {{/success}}
  when:
    status: [ success, failure ]
fredix's avatar
fredix committed
39
```