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
|
||||
task: notify-failed
|
||||
config:
|
||||
platform: linux
|
||||
image_resource:
|
||||
resource_types:
|
||||
- name: apprise
|
||||
type: registry-image
|
||||
source:
|
||||
repository: badouralix/curl-jq
|
||||
run:
|
||||
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
|
||||
repository: git.pim.kunis.nl/pim/concourse-apprise-notifier
|
||||
tag: 2f31a9abbbcdf29726e305cbf0702a581515f156eb5bfe09311a1232a941bb14
|
||||
|
||||
resources:
|
||||
- name: site-repo
|
||||
|
@ -41,6 +19,18 @@ resources:
|
|||
username: pim
|
||||
password: ((api_key))
|
||||
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:
|
||||
- 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
|
||||
docker stack deploy --compose-file docker-stack.yml static
|
||||
on_success:
|
||||
<< : *notify-success
|
||||
put: apprise-notification
|
||||
params:
|
||||
body: "Static website deployed!"
|
||||
no_get: true
|
||||
on_failure:
|
||||
<< : *notify-failed
|
||||
|
|
Reference in a new issue