-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: multiple channels #8
Comments
Jenkins doesn't allow to add post build action more than once, and it can't be changed. |
Can you please help me to create a pipeline job that is run after the main job and the only thing it does - sends the messages to the several Discord channels with build summary and artifact links? |
If you do not want to make pipeline jobs, You could use the post-build action "Build other projects" to have it call downstream freestyle or multi-configuration projects that have the Discord notifier as post-build actions. Hope this is helpful. Thanks for the great work! ~ melt |
Yeah, but will it have access to the artifacts of the upstream project? |
Ah, I didn't think of that. Still learning! :) |
Sadly I can't help you with creating such pipeline as I don't know how to do it :/ |
You're right. I've explored a bit and it looks like you're going to need to do a pipeline for this one. The Journey into learning Groovy and making Pipelines stored in Github or other version control is a beautiful thing and makes life so much better. It's worth checking out. Simply create a new pipeline and use the following snippet inside it. Note: I use the declarative pipeline syntax. Here's a snippet with pipeline example for discordSend function: node ('master') {
stage ('Notify') {
def discordDesc = "Description here.."
(...)
discordSend description: discordDesc,
footer: discordFooter,
link: env.JOB_URL,
result: currentBuild.currentResult,
title: discordTitle,
webhookURL: discordURL,
successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'),
thumbnail: discordImage,
notes: "Here's some Notes! @<id_to_mention>"
}
} You can set the variables and then call discordSend however you like, or put the fields as inline strings. |
Maybe is it a good idea to have multiple |
It's currently not possible to notify 2 channels and to add the plugin to the post-build step twice (it's greyed out). I think it's possible from a Pipeline, but I don't have a Pipeline job. Maybe as a workaround, someone could provide a simple downstream Pipeline job that only takes the upstream job info and sends it to Discord?
The text was updated successfully, but these errors were encountered: