use new apprise resource type
This commit is contained in:
parent
bfff4fa67a
commit
0dc76a2743
1 changed files with 22 additions and 29 deletions
47
pipeline.yml
47
pipeline.yml
|
@ -1,32 +1,10 @@
|
||||||
---
|
---
|
||||||
notify-failed: ¬ify-failed
|
resource_types:
|
||||||
task: notify-failed
|
- name: apprise
|
||||||
config:
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
type: registry-image
|
||||||
source:
|
source:
|
||||||
repository: badouralix/curl-jq
|
repository: git.pim.kunis.nl/pim/concourse-apprise-notifier
|
||||||
run:
|
tag: 2f31a9abbbcdf29726e305cbf0702a581515f156eb5bfe09311a1232a941bb14
|
||||||
path: sh
|
|
||||||
args:
|
|
||||||
- -exc
|
|
||||||
- |
|
|
||||||
curl -X POST -d '{"body":"Deployment failed!"}' -H "Content-Type: application/json" https://apprise.pim.kunis.nl:444/notify/concourse
|
|
||||||
notify-success: ¬ify-success
|
|
||||||
task: notify-deployed
|
|
||||||
config:
|
|
||||||
platform: linux
|
|
||||||
image_resource:
|
|
||||||
type: registry-image
|
|
||||||
source:
|
|
||||||
repository: badouralix/curl-jq
|
|
||||||
run:
|
|
||||||
path: sh
|
|
||||||
args:
|
|
||||||
- -exc
|
|
||||||
- |
|
|
||||||
curl -X POST -d '{"body":"Static website deployed!"}' -H "Content-Type: application/json" https://apprise.pim.kunis.nl:444/notify/concourse
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
- name: site-repo
|
- name: site-repo
|
||||||
|
@ -41,6 +19,18 @@ resources:
|
||||||
username: pim
|
username: pim
|
||||||
password: ((api_key))
|
password: ((api_key))
|
||||||
icon: docker
|
icon: docker
|
||||||
|
- name: apprise-notification
|
||||||
|
type: apprise
|
||||||
|
source:
|
||||||
|
host: https://apprise.pim.kunis.nl:444
|
||||||
|
key: concourse
|
||||||
|
icon: bell
|
||||||
|
|
||||||
|
notify-failed: ¬ify-failed
|
||||||
|
put: apprise-notification
|
||||||
|
params:
|
||||||
|
body: "Failed to deploy static website!"
|
||||||
|
no_get: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- name: build-static-website
|
- name: build-static-website
|
||||||
|
@ -171,6 +161,9 @@ jobs:
|
||||||
sed "s/TAG/$(cat site-registry-image/tag)/g" "site-repo/docker-stack.yml.template" > docker-stack.yml
|
sed "s/TAG/$(cat site-registry-image/tag)/g" "site-repo/docker-stack.yml.template" > docker-stack.yml
|
||||||
docker stack deploy --compose-file docker-stack.yml static
|
docker stack deploy --compose-file docker-stack.yml static
|
||||||
on_success:
|
on_success:
|
||||||
<< : *notify-success
|
put: apprise-notification
|
||||||
|
params:
|
||||||
|
body: "Static website deployed!"
|
||||||
|
no_get: true
|
||||||
on_failure:
|
on_failure:
|
||||||
<< : *notify-failed
|
<< : *notify-failed
|
||||||
|
|
Reference in a new issue