Skip to content

Conversation

kimdre
Copy link
Owner

@kimdre kimdre commented Jul 25, 2025

With this PR it is now possible to send status notifications of deployments to various platforms using the Apprise API.

New App settings to configure the Apprise integration:

  • APPRISE_API_URL: The URL of the Apprise API, .e.g http://apprise:8000/notify
  • APPRISE_NOTIFY_URLS: A comma-separated list of Apprise-URLs to send notifications to the supported platforms.
  • APPRISE_NOTIFY_URLS_FILE: Alternatively the file containing the Apprise-URLs (e.g. for usage with a secret)
  • APPRISE_NOTIFY_LEVEL: The minimum level of notifications to send to the Apprise notification service, must be one of info, success (default), warning, failure.

Example docker-compose.yaml

# docker-compose.yaml
services:
  app:
    container_name: doco-cd
    ...
    depends_on:
      - apprise
    environment:
      TZ: Europe/Berlin
      HTTP_PORT: 80
      LOG_LEVEL: info
      APPRISE_API_URL: http://apprise:8000/notify
      APPRISE_NOTIFY_LEVEL: success
      APPRISE_NOTIFY_URLS: "pover://{user_key}@{token},mailto://{user}:{password}@{domain}"
  ...

  apprise:
    image: caronc/apprise:latest
    restart: unless-stopped
    ports:
      - "8000:8000"
    environment:
      APPRISE_WORKER_COUNT: 1

ToDo

  • Add new app settings to wiki

@kimdre kimdre added the feature New feature label Jul 25, 2025
@kimdre kimdre added this to Doco-CD Jul 25, 2025
@kimdre kimdre added this to the v1 milestone Jul 25, 2025
@kimdre kimdre moved this to In Progress in Doco-CD Jul 25, 2025
@kimdre kimdre marked this pull request as draft July 25, 2025 16:48
@kimdre kimdre mentioned this pull request Jul 25, 2025
@kimdre kimdre linked an issue Jul 25, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jul 26, 2025

Codecov Report

❌ Patch coverage is 56.27706% with 101 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.44%. Comparing base (252b85a) to head (087ce29).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/doco-cd/poll_handler.go 20.00% 40 Missing ⚠️
cmd/doco-cd/http_handler.go 53.24% 35 Missing and 1 partial ⚠️
internal/notification/notification.go 73.80% 18 Missing and 4 partials ⚠️
internal/docker/compose.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
+ Coverage   50.15%   51.44%   +1.29%     
==========================================
  Files          23       24       +1     
  Lines        2642     2797     +155     
==========================================
+ Hits         1325     1439     +114     
- Misses       1125     1160      +35     
- Partials      192      198       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@strayer
Copy link

strayer commented Jul 27, 2025

Seems to work fine:
image

Not sure how I can test a failure. Could be helpful to have the git revision in there (maybe even a link to the commit in the repository?)

@kimdre
Copy link
Owner Author

kimdre commented Jul 28, 2025

Not sure how I can test a failure. Could be helpful to have the git revision in there (maybe even a link to the commit in the repository?)

@strayer you can place a random character in your compose file so that Docker cannot parse it.

@strayer
Copy link

strayer commented Jul 28, 2025

Codeberg was so kind to test a failure for me :D

image

Flux CD notifcations are pretty advanced:

image

I think adding the revision to the message would be really helpful, but everything else might more noise than help.

@kimdre
Copy link
Owner Author

kimdre commented Aug 13, 2025

@strayer I added some metadata to the notifications. Is something missing for you?

image

@strayer
Copy link

strayer commented Aug 14, 2025

@strayer I added some metadata to the notifications. Is something missing for you?
image

Looks good! I'll check this out soon, pretty busy at the moment :/ Hopefully will be able to test during the weekend.

@kimdre
Copy link
Owner Author

kimdre commented Aug 14, 2025

@strayer I will build you a new tagged image that you can test if you want: 0.32.0-rc.2

@kimdre kimdre marked this pull request as ready for review August 14, 2025 21:09
@kimdre kimdre enabled auto-merge (squash) August 20, 2025 07:21
@kimdre
Copy link
Owner Author

kimdre commented Aug 20, 2025

I will merge the changes now. If you encounter any problems you can comment in the old issue or open a new one.

@kimdre kimdre merged commit 4623184 into main Aug 20, 2025
8 of 10 checks passed
@kimdre kimdre deleted the feat/notifications branch August 20, 2025 07:23
@github-project-automation github-project-automation bot moved this from In Progress to Done in Doco-CD Aug 20, 2025
@strayer
Copy link

strayer commented Aug 20, 2025

I will merge the changes now. If you encounter any problems you can comment in the old issue or open a new one.

Thanks! I'll test for sure, just too busy at the moment 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Notifications
2 participants