add version in apprise notification

This commit is contained in:
Pim Kunis 2023-06-14 21:44:56 +02:00
parent dddfc9e028
commit eeb42dc2b7

View file

@ -4,7 +4,7 @@ resource_types:
type: registry-image
source:
repository: git.pim.kunis.nl/pim/concourse-apprise-notifier
tag: latest
tag: "1.1"
resources:
- name: site-repo
@ -35,7 +35,7 @@ resources:
branch: version
file: version
private_key: {{private_key}}
icon: numberic
icon: numeric
notify-failed: &notify-failed
put: apprise-notification
@ -99,7 +99,7 @@ jobs:
<< : *notify-failed
- get: version
params:
bump: minor
bump: patch
- put: site-registry-image
params:
image: image/image.tar
@ -111,10 +111,12 @@ jobs:
file: version/version
- name: deploy-static-website
plan:
- get: site-registry-image
- get: version
trigger: true
passed: [build-static-website]
- get: site-repo
- get: site-registry-image
passed: [build-static-website]
- task: deploy-site
config:
platform: linux
@ -127,6 +129,7 @@ jobs:
inputs:
- name: site-repo
- name: site-registry-image
- name: version
run:
path: sh
args:
@ -137,12 +140,14 @@ jobs:
cp site-repo/ssh_config $HOME/.ssh/config
echo "((private_key))" > $HOME/.ssh/id_ed25519
chmod 600 $HOME/.ssh/id_ed25519
sed "s/TAG/((image_version))/g" "site-repo/docker-stack.yml.template" > docker-stack.yml
sed "s/TAG/$(cat version/version)/g" "site-repo/docker-stack.yml.template" > docker-stack.yml
cat docker-stack.yml
docker stack deploy --compose-file docker-stack.yml static
on_success:
put: apprise-notification
params:
body: "Static website deployed!"
title: "Static website deployed!"
body: "New version: $(cat version/version)"
no_get: true
on_failure:
<< : *notify-failed