adding test containers
Some checks failed
Check scripts syntax / check-scripts-syntax (push) Successful in 3s
Test automated-nfs-backup / test-automated-nfs-backup (push) Successful in 4s
Haven Notify Build and Deploy / Build Haven Notify Image (pull_request) Has been cancelled
Haven Notify Build and Deploy / Build Haven Notify Image (PR) (pull_request) Has been cancelled
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (pull_request) Has been cancelled
Haven Notify Build and Deploy / Test Haven Notify (pull_request) Has been cancelled

This commit is contained in:
2026-07-16 09:14:51 -03:00
parent 0043c4ae00
commit b1cdf15cc8
19 changed files with 2390 additions and 298 deletions

View File

@@ -1,35 +1,22 @@
{{/*
Docker Backup Notification Template
Variables expected:
- .title: The backup title/name
- .asset: The asset being backed up
- .backupsizeinmb: The backup size in MB (will be formatted automatically)
- .extra: Optional array of additional fields with .name and .value
Template Functions Available:
- formatSize: Formats size in MB/GB automatically
*/}}
{
"embeds": [
{
"title": "📦 Backup - {{.title}}",
"description": "**{{.asset}}** has been backup-ed successfully! ✅🫡\n",
"title": {{json (printf "📦 Backup - %s" .Title)}},
"description": {{json (printf "**%s** has been backed up successfully! ✅🫡\n" .Asset)}},
"color": 3066993,
"fields": [
{
"name": "💾 Backup Size",
"value": "{{if .backupsizeinmb}}{{formatSize .backupsizeinmb}}{{else}}Unknown{{end}}",
"value": {{json (formatSize .BackupSizeInMB)}},
"inline": true
}
{{- if .extra}}
{{- range $index, $field := .extra}},
{{- range .Extra}},
{
"name": "{{$field.name}}",
"value": "{{$field.value}}",
"name": {{json .Name}},
"value": {{json .Value}},
"inline": true
}
{{- end}}
{{- end}}
],
"footer": {
"text": "✨ Haven Notify ✨"

View File

@@ -1,36 +1,26 @@
{{/*
Error Notification Template
Variables expected:
- .caller: The caller of the error
- .message: The error message
- .critical: Boolean indicating if the error is critical
- .extra: Optional array of additional fields with .name and .value
*/}}
{
"embeds": [
{
"title": "❌ Error",
"description": "**{{.caller}}** encountered an error!",
"color": {{if .critical}}15158332{{else}}15844367{{end}},
"description": {{json (printf "**%s** encountered an error!" .Caller)}},
"color": {{if .Critical}}15158332{{else}}15844367{{end}},
"fields": [
{
"name": "📄 Message",
"value": "{{.message}}",
"value": {{json .Message}},
"inline": false
}
{{- if .extra}}
{{- range $index, $field := .extra}},
{{- range .Extra}},
{
"name": "{{$field.name}}",
"value": "{{$field.value}}",
"name": {{json .Name}},
"value": {{json .Value}},
"inline": true
}
{{- end}}
{{- end}}
],
"footer": {
"text": "✨ Haven Notify ✨"
}
}
]
}
}

View File

@@ -1,23 +1,13 @@
{{/*
Update Notification Template
Variables expected:
- .host: The host where the update occurred
- .asset: The asset being updated (Docker or k8s)
- .time: The time in seconds that the script took to run
Template Functions Available:
- formatTime: Formats time in seconds to a human-readable format
*/}}
{
"embeds": [
{
"title": "🔄 Update - {{.asset}}",
"description": "**{{.host}}** has successfully updated **{{.asset}}**! ✅",
"title": {{json (printf "🔄 Update - %s" .Asset)}},
"description": {{json (printf "**%s** has successfully updated **%s**! ✅" .Host .Asset)}},
"color": 3447003,
"fields": [
{
"name": "⏱️ Time Taken",
"value": "{{if .time}}{{.time}}{{else}}Unknown{{end}} seconds",
"value": {{json (formatSeconds .Time)}},
"inline": true
}
],
@@ -26,4 +16,4 @@ Template Functions Available:
}
}
]
}
}