jenkinsci / discord-notifier-plugin

A post-build plugin that sends the build status to a Discord channel.
https://plugins.jenkins.io/discord-notifier/
MIT License
50 stars 25 forks source link

How to get notifications to match traditional notifications when moving to declarative pipelines? #131

Open mortenn opened 6 months ago

mortenn commented 6 months ago

Describe your use-case which is not covered by existing documentation.

I have some old builds using the gui to send notifications to discord, which show up like this: image

I have now set up a new server and am working on getting everything ported over using declarative pipelines. Tried adding this to the jenkinsfile:

discordSend description: 'Build finished', enableArtifactsList: true, footer: '', image: '', link: env.BUILD_URL, result: currentBuild.currentResult, scmWebUrl: '', showChangeset: true, thumbnail: '', title: env.JOB_NAME, webhookURL: env.DISCORD_WEBHOOK

which turns up looking this this: image

How do I get the new one to add the build number to the caption, and display build/status and the changelog with formatting?

As a bonus, if it would be possible to show the artifact list with just the filename with a link to the url rather than the full url, that would be nice

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

No response

Are you interested in contributing to the documentation?

I can contribute but would need information on how to achieve my stated goals.