Coder Social home page Coder Social logo

jenkinsci / discord-notifier-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kocproz/jenkins-discord

50.0 4.0 25.0 292 KB

A post-build plugin that sends the build status to a Discord channel.

Home Page: https://plugins.jenkins.io/discord-notifier/

License: MIT License

Java 93.43% HTML 6.57%

discord-notifier-plugin's Introduction

Discord Notifier

Discord Notifier provides a bridge between Jenkins and Discord through the built-in webhook functionality.

The purpose

The Jenkins Discord Webhook plugin was made to share results of a build to a Discord channel using the webhooks that Discord provides.

Through this plugin you are able to:

  • Get success and fail messages about your build
  • Link to build artifacts
  • List SCM changes to the build
  • Only send notifications on state change

Download

Discord notifier is available in official jenkins repos.

Usage

This plugin uses the post-build feature to execute a request.

After installing, go to your job's configure section and add the Discord Notifier item. Then proceed to enter your webhook URL.

Post-build dropdown with Discord Webhooks selected

There are a few options you can choose from:

  • Webhook URL
    • The URL of the webhook (pretty self-explanatory) provided by Discord
  • Send only on state change
    • Checking this will only send the message when the state of the current build differs from the previous
  • Send only failed
    • checking this will only send the failed job.
  • Advanced:
    • thumbnail
      • If set, the image under the URL shows up on the right side of Discord message.
    • Enable URL linking
      • Enables the title, build summary and build id to be linked to the build. Requires the URL to be set in Jenkins' global configuration
    • Enable artifact list
      • Enables the listing of the artifacts generated by the build
    • Enable version info in footer
      • Adds the "Jenkins version, Discord Webhook version" text in the footer of the message

Standard options in the Discord Webhook config Advanced tab in the config

Pipeline

Discord Notifier supports Jenkins Pipeline. The only required parameter is webhookURL (the URL of the webhook, of course) - but there isn't much point of sending nothing.

Parameters

  • webhookURL (required)
    • The URL of the webhook (pretty self-explanatory) provided by Discord.
  • title
    • The title of the embed.
  • link
    • If set, the title becomes a link to this URL.
  • thumbnail
    • If set, the image under the URL shows up on the right side of Discord message.
  • image
    • If set, the image under the URL shows up under discord message
  • description
  • footer
    • The text in footer of the message.
  • result
    • Sets the left side colour of the embed (SUCCESS - green, UNSTABLE - yellow, FAILURE - red, ABORTED - grey).

Example

discordSend description: "Jenkins Pipeline Build", footer: "Footer Text", link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: "Webhook URL"

discord-notifier-plugin's People

Contributors

andy2003 avatar andyczerwonka avatar ansismalins avatar aveao avatar bootjp avatar crystalldev avatar dahlgren avatar dependabot[bot] avatar fuzzmz avatar gohrel avatar jetersen avatar jlosito avatar jupjohn avatar kocproz avatar notmyfault avatar ricobrase avatar sirblobman avatar skyedra avatar thihup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

discord-notifier-plugin's Issues

placeholder

Hello,

can I also use other placeholders like build number, build log, chanchges, etc.?

Plugin no longer posts notifications

This used to work great for me. Now it doesn't work at all.

I recently tried building a project that had this set up working fine last year and now it no longer posts to the Discord channel. The webhook URL hasn't changed nor has anything to do with the build. The plugin is up-to-date.

Jenkins is pretty up-to-date as well. The project is a typical freestyle project using SVN as its SCM. (I'm also not able to get the plugin working with a Bitbucket Server project.)

Maybe I'm missing something?

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

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.

ENV variables not working in message

I have some env variables that get set during build and I am trying to pass them in the Note, but it comes across as $ENV_VAR instead of the actual text

Able to show only user, and commit info?

I'm trying to replicate this:

image

But having a difficult time in doing so. Using Source Code Management to watch an external svn repository.

Possible someone can help me with this? As I assume I need pipeline for this.

webhookURL via credentials

Is there any way to specify a credential ID in place of the webhookURL string or perhaps a env variable that could be made available via string credential binding?

I tried just entering a variable with the same name as defined in the credential binding plugin (which I used in shell scripts without issue) but the notification fails during build with:

java.net.MalformedURLException: no protocol: ${discordbuildwebhookurl}

Looking at the java file for the plugin, it appears to run env.expand(this.webhookURL) so I assume this is meant to be supported?

Unable to send keep getting WebhookException: {"embeds": ["0"]}

Version report

Jenkins and plugins versions report:

Jenkins: 2.277.4
OS: Linux - 4.18.0-240.el8.x86_64
---
cloudbees-folder:6.15
trilead-api:1.0.13
antisamy-markup-formatter:2.1
structs:1.23
workflow-basic-steps:2.23
workflow-step-api:2.23
token-macro:2.15
build-timeout:1.20
git:4.7.1
jaxb:2.3.0.1
credentials:2.4
gradle:1.36
plain-credentials:1.7
pipeline-milestone-step:1.3.2
ssh-credentials:1.18.1
credentials-binding:1.24
jsch:0.1.55.2
scm-api:2.6.4
workflow-api:2.42
git-client:3.7.1
timestamper:1.13
script-security:1.76
pipeline-input-step:2.12
plugin-util-api:2.2.0
font-awesome-api:5.15.3-2
popper-api:1.16.1-2
git-server:1.9
jquery3-api:3.6.0-1
pipeline-stage-step:2.5
bootstrap4-api:4.6.0-3
pipeline-graph-analysis:1.10
snakeyaml-api:1.27.0
jackson2-api:2.12.3
branch-api:2.6.4
echarts-api:5.1.0-2
display-url-api:2.3.4
workflow-support:3.8
checks-api:1.7.0
junit:1.49
pipeline-rest-api:2.19
matrix-project:1.18
resource-disposer:0.15
ws-cleanup:0.39
github:1.33.1
ant:1.11
durable-task:1.36
jdk-tool:1.5
workflow-durable-task-step:2.38
handlebars:3.0.8
command-launcher:1.6
bouncycastle-api:2.20
jjwt-api:0.11.2-9.c8b45b8bb173
ace-editor:1.1
workflow-scm-step:2.12
workflow-cps:2.91
okhttp-api:3.14.9
workflow-job:2.40
mailer:1.34
momentjs:1.1.1
apache-httpcomponents-client-4-api:4.5.13-1.0
pipeline-stage-view:2.19
pipeline-build-step:2.13
pipeline-model-api:1.8.4
pipeline-model-extensions:1.8.4
workflow-cps-global-lib:2.19
workflow-multibranch:2.23
pipeline-stage-tags-metadata:1.8.4
pipeline-model-definition:1.8.4
lockable-resources:2.10
workflow-aggregator:2.6
github-api:1.123
github-branch-source:2.10.4
pipeline-github-lib:1.0
ssh-slaves:1.31.5
matrix-auth:2.6.6
pam-auth:1.6
ldap:2.6
email-ext:2.82
dashboard-view:2.16
caffeine-api:2.9.1-23.v51c4e2c879c8
configuration-as-code:1.51
ssh-agent:1.22
htmlpublisher:1.25
gitlab-plugin:1.5.20
emailext-template:1.2
publish-over:0.22
publish-over-ssh:1.22
ssh:2.6.1
ansible:1.1
discord-notifier:1.4.14
rocketchatnotifier:1.4.9

  • What Operating System are you using (both controller, and any agents involved in the problem)?
RHEL8

Reproduction steps

Within a declarative pipeline (webhook URL edited below) I've added this

    stage('Notify sucess') {
        steps{
        discordSend(description: "${currentBuild.currentResult}: Job ${env.JOB_NAME} \nBuild: ${env.BUILD_NUMBER} \nMore info at: \n${env.BUILD_URL}", footer: 'No-Code', unstable: true, link: env.BUILD_URL, result: "${currentBuild.currentResult}", title: "${JOB_NAME} << CLICK", webhookURL: 'https://discord.com/api/webhooks/842304094/yeoAn6A_9XY2O71dFbhlt9lUZrAW6OnFEG7y')
            }
    }

Even if i use something far similar

discordSend description: '', footer: '', image: '', link: 'env.BUILD_URL', result: '', thumbnail: '', title: 'MoveFiles', webhookURL: 'https://discord.com/api/webhooks/842304094/yeoAn6A_9XY2O71dFbhlt9lUZrAW6OnFEG7y'

Results

Expected result:

Message in discord

Actual result:

nz.co.jammehcow.jenkinsdiscord.exception.WebhookException: {"embeds": ["0"]}
at nz.co.jammehcow.jenkinsdiscord.DiscordWebhook.send(DiscordWebhook.java:212)
at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:171)
at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:132)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate2(ACL.java:449)
at hudson.security.ACL.impersonate(ACL.java:461)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

Completed Stage list

What feature do you want to see added?

Can you separate the embed message with every stage completed and his build link
And the color of the embed is based on how mutch stage is completed
for example if 2 of 6 stage is completed you use red
if 3 of 6 stage is completed you use red
and if 4 of 6 stage is completed you use green

Upstream changes

No response

Suggestions: Improve display of webhook

I have a few suggestions to improve the overall display of the Discord Webhook which I list below

Link to a GitHub commit when available.

Right now are GitHub commits displayed like this:

- `abc1234` *GitHub Commit message - user*

While this isn't bad at all, does it miss out on a oportunity, to actually link to a GitHub Commit.
My suggestion is to link to the Commit itself.

- [`abc1234`](https://github.com/MyName/MyRepo/commit/abc1234{sha}) *GitHub Commit message - user*

Add option to use embedded links for Artifact jar.

Right now does the webhook display artifacts like this:

**Artifacts:**
- https://ci.example.com/job/MyJob/1/artifact/path/Artifact.jar

This can look horrible, if the link is quite long.
I suggest to add an option to have the link embedded like this:

**Artifacts:**
- [Artifact.jar](https://ci.example.com/job/MyJob/1/artifact/path/Artifact.jar)

Use actual embed fields instead of Description.

I personally think it would be better to have the different parts (changes and artifacts) in separate fields.
Downside would be a lower text length (Only 1000 characters) but this could be bypassed by having a new field with a zero-width space as title (\u200E) which is supported by Discord.

The biggest downside will be the total character length of 6000 characters per webhook, but this would also be an issue with just using the description, which limits the text to 2000 characters anyway.


I made a very basic example using Leovoel's Embed Visualizer
image

Installation instructions outdated

The readme states that a manual install is required, but I found it and installed it through jenkins plugin manager under the 'Available' tab. I've verified that the plugin works after installing.

Plugin not working for maven jobs

Hi, I was using version 1.1.0 of this plugin, today I uninstalled old version and installed the newest version from plugin manager and now the plugin isn't working for maven jobs, I tested it with a gradle job and worked fine.

Jenkins version: 2.138.3
Plugin version: 1.4.2
Errors in console:

ERROR: Build step failed with exception
java.lang.ClassCastException: hudson.maven.MavenModuleSet cannot be cast to hudson.model.Project
	at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:112)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1098)
	at hudson.model.Run.execute(Run.java:1866)
	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Discord Notifier' marked build as failure

Discord notification not being sent

Jenkins and plugins versions report

Environment
Jenkins: 2.334
OS: Linux - 5.11.0-1025-oracle
---
ace-editor:1.1
adoptopenjdk:1.4
ant:1.13
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-4
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:751.vda_24678a_f781
cloudbees-folder:6.17
command-launcher:1.6
config-file-provider:3.9.0
credentials:1074.v60e6c29b_b_44b_
credentials-binding:1.27.1
dark-theme:156.v6cf16af6f9ef
discord-notifier:205.v893fce17f6cd
display-url-api:2.3.5
docker-commons:1.19
docker-workflow:1.28
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-2
email-ext:2.87
file-operations:1.11
font-awesome-api:5.15.4-5
git:4.10.3
git-client:3.11.0
git-parameter:0.9.15
git-server:1.10
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.4
gradle:1.38
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
jackson2-api:2.13.1-246.va8a9f3eaf46a
javadoc:217.v905b_86277a_2a_
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-1
jquery:1.12.4-1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.55
ldap:2.7
lockable-resources:2.14
login-theme:1.1
mailer:408.vd726a_1130320
mapdb-api:1.0.9.0
material-theme:0.4.1
matrix-auth:3.0.1
matrix-project:1.20
maven-plugin:3.16
momentjs:1.1.1
next-build-number:1.8
nodejs:1.5.1
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.7
pipeline-build-step:2.15
pipeline-github-lib:36.v4c01db_ca_ed16
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-milestone-step:100.v60a_03cd446e1
pipeline-model-api:2.2064.v5eef7d0982b_e
pipeline-model-definition:2.2064.v5eef7d0982b_e
pipeline-model-extensions:2.2064.v5eef7d0982b_e
pipeline-rest-api:2.21
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:2.2064.v5eef7d0982b_e
pipeline-stage-view:2.21
plain-credentials:1.8
plugin-util-api:2.13.0
popper-api:1.16.1-2
popper2-api:2.11.2-1
resource-disposer:0.17
role-strategy:3.2.0
scm-api:595.vd5a_df5eb_0e39
script-security:1131.v8b_b_5eda_c328e
simple-theme-plugin:103.va_161d09c38c7
snakeyaml-api:1.29.1
solarized-theme:0.1
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
subversion:2.15.2
theme-manager:0.6
timestamper:1.17
token-macro:270.v8c2ce50dc4fc
trilead-api:1.0.13
workflow-aggregator:2.6
workflow-api:1136.v7f5f1759dc16
workflow-basic-steps:937.v7a_b_7579e07a_3
workflow-cps:2648.va9433432b33c
workflow-cps-global-lib:552.vd9cc05b8a2e1
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1167.v8fe861b_09ef9
workflow-multibranch:706.vd43c65dec013
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:813.vb_d7c3d2984a_0
ws-cleanup:0.40

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu 20.04

Reproduction steps

  1. Have a github maven or gradle project in jenkins with Github hook
  2. Merge changes in github repo
  3. Jenkins starts to build the changes

Expected Results

Sending notification to Discord.
Finished: SUCCESS

Actual Results

Archiving artifacts
ERROR: Build step failed with exception
java.lang.NullPointerException: Cannot invoke "String.length()" because "s" is null
at java.base/java.util.Formatter.parse(Formatter.java:2717)
at java.base/java.util.Formatter.format(Formatter.java:2671)
at java.base/java.util.Formatter.format(Formatter.java:2625)
at java.base/java.lang.String.format(String.java:4140)
at nz.co.jammehcow.jenkinsdiscord.util.EmbedDescription.(EmbedDescription.java:50)
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:300)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:814)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:763)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.cleanUp(MavenModuleSetBuild.java:1097)
at hudson.model.Run.execute(Run.java:1943)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Build step 'Discord Notifier' marked build as failure
Finished: SUCCESS

Anything else?

Works sometimes when manually triggering the build
Tried disabling all the custom options like Title, logo, etc and still same

Only notifies once after restarting Jenkins service

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 10 Pro 64bits

Reproduction steps

Everytime I run a build that is supposed to notify by discord, it only works if it is right after I restart Jenkins service. Every other time, it doesn't notify.
The log says: "Sending notification to Discord.", but the notification doesn't appear.
E-mail notifications work perfect.
I'm working on Jenkins 2.406, and the Discord Notifier plugin is up to date.

In the plugin's previous version there was an exception when trying to notify, but they fix it in this version.

Expected Results

Discord notification on every build.

Actual Results

Only notifies once after restarting Jenkins service.

Anything else?

No response

Changes truncated on newline

Jenkins and plugins versions report

Environment
Jenkins: 2.332.1
OS: Windows 10 - 10.0
---
ace-editor:1.1
ant:1.13
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
badge:1.9.1
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-6
bouncycastle-api:2.25
branch-api:2.7.0
build-monitor-plugin:1.13+build.202203141426
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-folder:6.708.ve61636eb_65a_5
command-launcher:1.6
configuration-as-code:1414.v878271fc496f
credentials:1074.v60e6c29b_b_44b_
credentials-binding:1.27.1
dashboard-view:2.19
discord-notifier:1.4.14
display-url-api:2.3.5
durable-task:493.v195aefbb0ff2
echarts-api:5.3.0-2
email-ext:2.87
envinject:2.839.v52c702c10635
envinject-api:1.180.v98d833b_27470
font-awesome-api:6.0.0-1
git:4.10.3
git-client:3.11.0
git-server:1.10
github:1.34.3
github-api:1.301-378.v9807bd746da5
github-branch-source:1583.v18d333ef7379
gradle:1.38
groovy-postbuild:2.5
handlebars:3.0.8
jackson2-api:2.13.2-260.v43d711474c77
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jdk-tool:1.5
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-3
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.56
ldap:2.8
lockable-resources:2.14
mailer:408.vd726a_1130320
mapdb-api:1.0.9.0
matrix-auth:3.1
matrix-project:758.v7a_ea_491852f3
momentjs:1.1.1
msbuild:1.30
okhttp-api:4.9.3-105.vb96869f8ac3a
p4:1.12.2
pam-auth:1.7
pipeline-build-step:2.16
pipeline-github-lib:36.v4c01db_ca_ed16
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-milestone-step:100.v60a_03cd446e1
pipeline-model-api:2.2064.v5eef7d0982b_e
pipeline-model-definition:2.2064.v5eef7d0982b_e
pipeline-model-extensions:2.2064.v5eef7d0982b_e
pipeline-rest-api:2.23
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:2.2064.v5eef7d0982b_e
pipeline-stage-view:2.23
plain-credentials:1.8
plugin-util-api:2.14.0
popper-api:1.16.1-2
popper2-api:2.11.2-1
postbuildscript:3.1.0-375.v3db_cd92485e1
preSCMbuildstep:0.3
resource-disposer:0.17
saferestart:0.3
scm-api:595.vd5a_df5eb_0e39
scmskip:1.0.3
script-security:1140.vf967fb_efa_55a_
snakeyaml-api:1.29.1
ssh-credentials:1.19
ssh-slaves:1.806.v2253cedd3295
ssh2easy:1.4
sshd:3.1.0
structs:308.v852b473a2b8c
timestamper:1.17
token-macro:280.v97a_82642793c
trilead-api:1.0.13
windows-slaves:1.8
workflow-aggregator:2.7
workflow-api:1143.v2d42f1e9dea_5
workflow-basic-steps:941.vdfe1b_a_132c64
workflow-cps:2660.vb_c0412dc4e6d
workflow-cps-global-lib:564.ve62a_4eb_b_e039
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1174.vdcb_d054cf74a_
workflow-multibranch:711.vdfef37cda_816
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:815.vd60466279fc8
ws-cleanup:0.40

What Operating System are you using (both controller, and any agents involved in the problem)?

win10 64-bit

Reproduction steps

  1. Triggered build happens from perforce machine.
  2. Job runs, grabs commit notes from p4 plugin
  3. Discord Notifier posts build results to discord

Expected Results

Expect to see entire notes from each new commit that was scraped from perforce.

Actual Results

Only the first line up to the first newline is included.

In this image:

  1. There were multiple lines in these commit notes.
  2. Note that the version displayed here says v1.4.11 despite being the new v206.vee9f4569ee63
  3. Rolling back to 1.4.14 restores this functionality (although my cool Jenkins avator logo is gone).

image

Anything else?

No response

Feature Request: Custom message and way to remove changeset

Hello,

I'd like to be able to add custom message to the notifications sent. I need it to notify some discord members or actually give more info about the build.

And since this job doesn't have any repository tied to it - there will never be any changset to show. Thus I'd like to remove it altogether from the message.

Thanks in advance for your time taken into replying.

Cheers,
Furai

Feature Request : Send notification throught a proxy

Since our system admin updated proxy configuration of Jenkins's proxy, notifications are not sent using pipeline command discordSend. I think DiscordWebhook.java need to be changed to use proxy if defined in "pluginManager > advanced".

Is my analysis right ?

Useful Links
Unirest proxy documentation
I guess this function need to be changed :

Send only when fail button check

Feature Request

We have a Only send on state change check, but the use case here is quite different.

For example, I have a backup database job run everyday, I don't want to notify system admin when thing going well but do want to remind them everyday when the job fail.

They might miss when backup job fail the first time and subsequent fail will go unnoticed since it the same behavior with successful, hence I propose Send only when fail button.

How to insert ENV variable into the field "Branch name"

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

I would like to show current branch name in my notifications messages
image
But it's not worked properly
image

It it any clue how to do this?

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

No response

Failing Job with Send notification when job starts in Jenkins 2.387.3

Jenkins and plugins versions report

Environment
Jenkins: 2.387.3
OS: Windows 10 - 10.0
Java: 11.0.16 - Oracle Corporation (Java HotSpot(TM) 64-Bit Server VM)
---
BlameSubversion:1.200
ace-editor:1.1
ant:487.vd79d090d4ea_e
antisamy-markup-formatter:159.v25b_c67cd35fb_
apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.53.v1c90fd9191a_b_
blueocean-commons:1.27.4
blueocean-core-js:1.27.4
blueocean-dashboard:1.27.4
blueocean-github-pipeline:1.27.4
blueocean-i18n:1.27.4
blueocean-jwt:1.27.4
blueocean-personalization:1.27.4
blueocean-pipeline-api-impl:1.27.4
blueocean-pipeline-scm-api:1.27.4
blueocean-rest:1.27.4
blueocean-rest-impl:1.27.4
blueocean-web:1.27.4
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.2-3
bouncycastle-api:2.27
branch-api:2.1092.vda_3c2a_a_f0c11
build-timeout:1.30
built-on-column:1.4
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
checks-api:2.0.0
cloudbees-folder:6.815.v0dd5a_cb_40e0e
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
conditional-buildstep:1.4.2
config-file-provider:938.ve2b_8a_591c596
cors-filter:1.1
credentials:1254.vb_96f366e7b_a_d
credentials-binding:604.vb_64480b_c56ca_
data-tables-api:1.13.3-3
discord-notifier:229.v57c742b_80ff0
display-url-api:2.3.7
dotnet-sdk:1.4.0
durable-task:507.v050055d0cb_dd
echarts-api:5.4.0-3
email-ext:2.97
envinject:2.901.v0038b_6471582
envinject-api:1.199.v3ce31253ed13
extended-read-permission:3.2
external-monitor-job:203.v683c09d993b_9
favorite:2.4.1
font-awesome-api:6.3.0-2
generic-webhook-trigger:1.86.3
ghprb:1.42.2
git:5.0.2
git-client:4.2.0
git-server:99.va_0826a_b_cdfa_d
github:1.37.0
github-api:1.314-431.v78d72a_3fe4c3
github-branch-source:1703.vd5a_2b_29c6cdc
gradle:2.7
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:142.v04572ca_5b_265
ionicons-api:45.vf54fca_5d2154
jackson2-api:2.15.0-334.v317a_165f9b_7c
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javadoc:233.vdc1a_ec702cff
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
jenkins-design-language:1.27.4
jenkins-multijob-plugin:623.v03401733c9a_9
jigomerge:0.9
jjwt-api:0.11.5-77.v646c772fddb_0
jnr-posix-api:3.1.16-2
jquery-detached:1.2.1
jquery3-api:3.6.4-1
jsch:0.2.8-65.v052c39de79b_2
junit:1202.v79a_986785076
ldap:676.vfa_64cf6b_b_002
lockable-resources:1156.v5e9f897ece02
mailer:448.v5b_97805e3767
mapdb-api:1.0.9-28.vf251ce40855d
matrix-auth:3.1.7
matrix-project:789.v57a_725b_63c79
maven-plugin:3.22
metrics:4.2.13-420.vea_2f17932dd6
mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_
momentjs:1.1.1
monitoring:1.94.1
msbuild:1.30
nodelabelparameter:1.11.0
okhttp-api:4.10.0-132.v7a_7b_91cef39c
pam-auth:1.10
parameterized-trigger:2.45
pipeline-build-step:491.v1fec530da_858
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7
pipeline-input-step:468.va_5db_051498a_4
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2131.vb_9788088fdb_5
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:2.2131.vb_9788088fdb_5
pipeline-model-extensions:2.2131.vb_9788088fdb_5
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2131.vb_9788088fdb_5
pipeline-stage-view:2.32
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.2.1
popper-api:1.16.1-3
popper2-api:2.11.6-2
powershell:2.0
pubsub-light:1.17
resource-disposer:0.22
role-strategy:633.v836e5b_3e80a_5
run-condition:1.5
scm-api:667.v8b_6e07cdc7f2
script-security:1244.ve463715a_f89c
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
sse-gateway:1.26
ssh-credentials:305.v8f4381501156
ssh-slaves:2.877.v365f5eb_a_b_eec
sshd:3.275.v9e17c10f2571
structs:324.va_f5d6774f3a_d
thinBackup:1.17
timestamper:1.25
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
visual-basic-6:2.0
windows-slaves:1.8.1
workflow-aggregator:596.v8c21c963d92d
workflow-api:1213.v646def1087f9
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3659.v582dc37621d8
workflow-cps-global-lib:609.vd95673f149b_b
workflow-durable-task-step:1246.v5524618ea_097
workflow-job:1295.v395eb_7400005
workflow-multibranch:746.v05814d19c001
workflow-scm-step:408.v7d5b_135a_b_d49
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.45

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows 10 - Controller
Windows Server 2012 - Agent

Reproduction steps

I updated Jenkins to Jenkins 2.387.3
Updated all the plugins including this one.

But now I have the following error if I check Send notification when job starts
image

If I uncheck that checkbox, it works fine

Expected Results

Work as expected.

Actual Results

Lanzada por el usuario Lucas Recoaro
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Ejecutando remotamente en ao20-staging (AO20-TEST)en el espacio de trabajo C:\jenkins-agent\workspace\re20-server-reiniciar
true
FATAL: Index 1 out of bounds for length 1
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.lambda$prebuild$1(WebhookPublisher.java:205)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.prebuild(WebhookPublisher.java:205)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:869)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:864)
at hudson.model.Build$BuildExecution.doRun(Build.java:146)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1900)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
ERROR: Build step failed with exception
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.lambda$perform$3(WebhookPublisher.java:327)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:327)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:189)
at hudson.model.Run.execute(Run.java:1947)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Build step 'Discord Notifier' marked build as failure
Finished: FAILURE

Anything else?

No response

Please release fix for issue: Webhooks created after July 22 don't work because the regex only expects an 18-character id

Jenkins and plugins versions report

all

What Operating System are you using (both controller, and any agents involved in the problem)?

windows server. not applicable.

Reproduction steps

Create a new webhook in discord. Attempt to use said webhook in the discord plugin.

Expected Results

Messages are sent to discord on failed builds.

Actual Results

The user sees the error "Please enter a valid Discord webhook URL." and discord messages are never sent.

Anything else?

This bug already has a fix merged into master, it just needs to be released: 6af4713

Bot username configured as Jenkins

I've created a bot to my channel but everytime is triggered any action by Jenkins, my username's bot is set as Jenkins instead the username I created. Is there any config in plugin to change this?

image

`nulljob` artifact links

DS #203
Build: 203
Status: success
Changes:
- be5f20 library working - Andrey Kiryushkin
- 1cf8c1 the spell bar - Andrey Kiryushkin

Artifacts:
- nulljob/DS/203/artifact/builds/DS-203-1cf8c1-macOS-debug.zip
- nulljob/DS/203/artifact/builds/DS-203-1cf8c1-Windows-debug.zip

Jenkins URL is set in the global settings so it's not an issue.

showChangeset: true with perforce shows the changes twice on discord

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

windows

Reproduction steps

Set showChangeset: true on discordSend line at the jenkins pipeline script

Expected Results

Display the changes only one time, not twice

Actual Results

Displays the list of changes twice on discord
image

Anything else?

No response

Feature Request: multiple channels

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?

Cannot find where to configure Discord Notifier.

I started a Jenkins sever on my local machine, created jobs and installed this plugin. But I cannot find where to use it, I couldn't find out the same options like the pictures in your guide instructs.

I just got this at my job configure:

image

Nothing like 'Add post-build action', are there something I did wrong?

Notification can be sent to channel but no content shown inside the channel

Jenkins and plugins versions report

Notification can be sent to channel but no content shown inside the channel
Jenkins: 2.379
OS: Linux - 4.4.180+
---
ace-editor:1.1
ant:481.v7b_09e538fcca
antisamy-markup-formatter:155.v795fb_8702324
apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.1-3
bouncycastle-api:2.26
branch-api:2.1046.v0ca_37783ecc5
build-timeout:1.20
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
checks-api:1.8.0
cloudbees-folder:6.722.v8165b_a_cf25e9
command-launcher:90.v669d7ccb_7c31
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-27.vb_fa_3896786a_7
copyartifact:1.46.4
credentials:1214.v1de940103927
credentials-binding:523.vd859a_4b_122e6
discord-notifier:206.vee9f4569ee63
display-url-api:2.3.6
durable-task:501.ve5d4fc08b0be
echarts-api:5.4.0-1
email-ext:2.89
font-awesome-api:6.2.0-3
git:4.14.1
git-client:3.13.0
git-server:1.9
github:1.36.0
github-api:1.303-400.v35c2d8258028
github-branch-source:2.9.0
github-oauth:0.33
gradle:2.1.1
handlebars:3.0.8
instance-identity:116.vf8f487400980
ionicons-api:31.v4757b_6987003
jackson2-api:2.13.4.20221013-295.v8e29ea_354141
jakarta-activation-api:2.0.1-2
jakarta-mail-api:2.0.1-2
javax-activation-api:1.2.0-5
javax-mail-api:1.6.2-8
jaxb:2.3.7-1
jdk-tool:63.v62d2fd4b_4793
jquery-detached:1.2.1
jquery3-api:3.6.1-2
jsch:0.1.55.61.va_e9ee26616e7
junit:1160.vf1f01a_a_ea_b_7f
ldap:2.9
lockable-resources:2.18
mailer:438.v02c7f0a_12fa_4
material-theme:0.4.1
matrix-auth:3.1.5
matrix-project:785.v06b_7f47b_c631
mina-sshd-api-common:2.9.1-44.v476733c11f82
mina-sshd-api-core:2.9.1-44.v476733c11f82
momentjs:1.1.1
okhttp-api:4.9.3-108.v0feda04578cf
pam-auth:1.10
pipeline-build-step:2.18
pipeline-github-lib:1.0
pipeline-graph-analysis:1.11
pipeline-input-step:466.v6d0a_5df34f81
pipeline-milestone-step:101.vd572fef9d926
pipeline-model-api:1.9.3
pipeline-model-definition:1.7.2
pipeline-model-extensions:1.7.2
pipeline-rest-api:2.28
pipeline-stage-step:293.v200037eefcd5
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.28
plain-credentials:1.8
plugin-util-api:2.18.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
postbuildscript:3.1.0-375.v3db_cd92485e1
resource-disposer:0.20
scm-api:621.vda_a_b_055e58f7
script-security:1190.v65867a_a_47126
simple-theme-plugin:103.va_161d09c38c7
slack:2.49
snakeyaml-api:1.31-84.ve43da_fb_49d0b
ssh-credentials:305.v8f4381501156
ssh-slaves:1.31.2
sshd:3.249.v2dc2ea_416e33
structs:324.va_f5d6774f3a_d
theme-manager:0.6
timestamper:1.20
token-macro:321.vd7cc1f2a_52c8
trilead-api:2.72.v2a_3236754f73
workflow-aggregator:2.7
workflow-api:1200.v8005c684b_a_c6
workflow-basic-steps:2.24
workflow-cps:3536.vb_8a_6628079d5
workflow-cps-global-lib:2.17
workflow-durable-task-step:1139.v252a_e12e8463
workflow-job:1145.v7f2433caa07f
workflow-multibranch:716.vc692a_e52371b_
workflow-scm-step:400.v6b_89a_1317c9a_
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.43

What Operating System are you using (both controller, and any agents involved in the problem)?

Dockerised jenkins

Reproduction steps

  1. Create free style project
  2. In post build action, add discord notifier
  3. Paste discord webhook
  4. Save
  5. Run the job

Expected Results

Able to see content in channel

Actual Results

Cannot see content in channel

Screenshot 2022-12-01 at 5 46 08 PM

Anything else?

No response

ENV variables not working in description

I creating a Jenkins pipeline and am trying to send a message to Discord at the end.
The message is being sent, but I am unable to format the message the way I want.

I am trying to include the build number in the description using (note: I tried multiple variable names):
discordSend description: '**Build** ${env.BUILD_NUMBER} ${BUILD_NUMBER} $BUILD_NUMBER $ENV_BUILD_NUMBER ${ENV_BUILD_NUMBER}\n**Status**', link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: '<my_discord_webhook_url>'

But none of these are showing the build number. It just shows as: "Build ${env.BUILD_NUMBER} ${BUILD_NUMBER} $BUILD_NUMBER $ENV_BUILD_NUMBER ${ENV_BUILD_NUMBER}" in my Discord.
What is the correct way to include the build number in the description?

Support for linking local file path

What feature do you want to see added?

I am storing builds in a folder shared over the local network and would like for such links to be valid. Example link: file://desktop-jenkins/Builds/

Upstream changes

No response

Only the first message is send when used behind proxy

Jenkins and plugins versions report

Environment
Jenkins: 2.335
OS: Linux - 4.15.0-161-generic
---
ace-editor:1.1
ant:1.13
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
authentication-tokens:1.4
basic-branch-build-strategies:1.3.2
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-6
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-bitbucket-branch-source:757.vddedc5f2589a_
cloudbees-folder:6.708.ve61636eb_65a_5
command-launcher:1.6
config-file-provider:3.9.0
credentials:1074.v60e6c29b_b_44b_
credentials-binding:1.27.1
discord-notifier:206.vee9f4569ee63
display-url-api:2.3.5
durable-task:493.v195aefbb0ff2
echarts-api:5.3.0-2
email-ext:2.87
font-awesome-api:6.0.0-1
git:4.10.3
git-client:3.11.0
git-server:1.10
github:1.34.3
github-api:1.301-378.v9807bd746da5
github-branch-source:1583.v18d333ef7379
gradle:1.38
h2-api:1.4.199
handlebars:3.0.8
handy-uri-templates-2-api:2.1.8-1.0
jackson2-api:2.13.2-260.v43d711474c77
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-3
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.56
ldap:2.8
lockable-resources:2.14
mailer:408.vd726a_1130320
matrix-auth:3.1
matrix-project:758.v7a_ea_491852f3
momentjs:1.1.1
next-build-number:1.8
nodejs:1.5.1
oic-auth:1.8
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.7
pipeline-build-step:2.16
pipeline-github-lib:36.v4c01db_ca_ed16
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-maven:3.10.0
pipeline-milestone-step:100.v60a_03cd446e1
pipeline-model-api:2.2064.v5eef7d0982b_e
pipeline-model-definition:2.2064.v5eef7d0982b_e
pipeline-model-extensions:2.2064.v5eef7d0982b_e
pipeline-npm:0.9.2
pipeline-rest-api:2.23
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:2.2064.v5eef7d0982b_e
pipeline-stage-view:2.23
pipeline-utility-steps:2.12.0
plain-credentials:1.8
plugin-util-api:2.14.0
popper-api:1.16.1-2
popper2-api:2.11.2-1
resource-disposer:0.17
scm-api:595.vd5a_df5eb_0e39
script-security:1140.vf967fb_efa_55a_
snakeyaml-api:1.29.1
ssh-credentials:1.19
ssh-slaves:1.806.v2253cedd3295
sshd:3.1.0
structs:308.v852b473a2b8c
timestamper:1.17
token-macro:280.v97a_82642793c
trilead-api:1.0.13
workflow-aggregator:2.7
workflow-api:1143.v2d42f1e9dea_5
workflow-basic-steps:941.vdfe1b_a_132c64
workflow-cps:2660.vb_c0412dc4e6d
workflow-cps-global-lib:564.ve62a_4eb_b_e039
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1174.vdcb_d054cf74a_
workflow-multibranch:711.vdfef37cda_816
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:815.vd60466279fc8
ws-cleanup:0.40

What Operating System are you using (both controller, and any agents involved in the problem)?

host: ubuntu 18.04, docker: 20.10.12, image: jenkins-slim:latest

Reproduction steps

  1. Use Jenkins behind a Proxy
  2. Run Pipeline:
node {
    discordSend description: '1232', footer: '222', title: "foo bar1", webhookURL: '....'
}

Expected Results

Each time the pipeline is triggered a new notification is sent to the discord channel

Actual Results

Only the 1st time the pipeline is triggered a new notification is sent to the discord channel.
Each succeeding invocation of the pipeline results in the following error being logged on the console:

This should be done rarely.
        at kong.unirest.Config.validateClientsNotRunning(Config.java:902)
        at kong.unirest.Config.proxy(Config.java:205)
        at nz.co.jammehcow.jenkinsdiscord.DiscordWebhook.send(DiscordWebhook.java:208)
        at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:240)
        at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:185)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
        at hudson.security.ACL.impersonate2(ACL.java:451)
        at hudson.security.ACL.impersonate(ACL.java:463)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

Anything else?

No response

Please enter a valid Discord webhook URL

Discord is changing domains from Discordapp.com to Discord.com, and making the former unusable on November 7th, 2020.

If i currently set a discord.com Webhook URL i get the Please enter a valid Discord webhook URL. error/warning.

Feature Request: Add output log to message

Hi,

is it possible to add a feature to include the output log as attached file to the message in Discord? This would be very helpful for times where you don't have access to your build machine (e.g. you are out of office and your build machine is only accessible within your office network).

Thanks
Tim

Ability to censor commits and authors

It would be nice to be able to censor certain commits.
For example, say a commit message contains a name, etc of a new feature and you don't want it to be posted. If the message contains (regex) or starts with (regex) then it would set the message for discord to be like below.

Also removing the author name/email of said commit or change would be great.

  • Cool feature A
  • *hidden Cool new feature
  • Fix for feature A

Would be sent as

  • Cool feature A
  • Hidden Commit
  • Fix for feature A

Faulty Job Name processing

Hi there,

I recently discovered your awesome Jenkins plugin. Good work!

However, it seems to have a bug regarding the job name processing.
Job names may contain parenthesis, but your plugins seems to cannot handle it correctly.

One of my jobs is titled "ELMRSG - Development (luckev.info) - Deployment".
"luckev.info" is surrounded by parenthesis, so the following bug occurs:
bug

So basically the link is broken, as the linked build number and build state refer to "https://www.luckev.info/jenkins/job/ELMRSG%20-%20Development%20(luckev.info" and the ")" disappears and the remaining characters behind ")" are simply displayed behind the actual link.

I'd be great, if you could fix this issue.
Sincerely, Pad

Clean 2.289.2 LTS LinkageError

Version report

Jenkins and plugins versions report:

Jenkins: 2.289.2 LTS 
Discord Notifier: 1.4.14
  • What Operating System are you using (both controller, and any agents involved in the problem)?
Docker image jenkins/jenkins:lts-centos7

Reproduction steps

  • docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:lts-centos7
  • Install suggested plugins on installation
  • Install Discord notifier 1.4.14
  • Create a clean Job with only the post build action

Results

Expected result:
Expected to send a notification to Discord

Actual result:
LinkageError

ERROR: Step ?Discord Notifier? aborted due to exception: 
java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.http.impl.auth.HttpAuthenticator.<init>(Lorg/apache/commons/logging/Log;)V" the class loader (instance of hudson/ClassicPluginStrategy$AntClassLoader2) of the current class, org/apache/http/impl/nio/client/MainClientExec, and the class loader (instance of java/net/URLClassLoader) for the method's defining class, org/apache/http/impl/auth/HttpAuthenticator, have different Class objects for the type org/apache/commons/logging/Log used in the signature
	at org.apache.http.impl.nio.client.MainClientExec.<init>(MainClientExec.java:111)
	at org.apache.http.impl.nio.client.HttpAsyncClientBuilder.build(HttpAsyncClientBuilder.java:849)
	at com.mashape.unirest.http.options.Options.refresh(Options.java:93)
	at com.mashape.unirest.http.options.Options.<clinit>(Options.java:46)
	at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:151)
	at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:131)
	at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)
	at nz.co.jammehcow.jenkinsdiscord.DiscordWebhook.send(DiscordWebhook.java:208)
	at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:293)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:803)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:752)
	at hudson.model.Build$BuildExecution.cleanUp(Build.java:187)
	at hudson.model.Run.execute(Run.java:1953)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: SUCCESS

update

Sorry, it was the wrong Java version (8) inside the container. When updated to Java 11 it worked fine.

Pipeline failure: NullPointerException

Jenkins and plugins versions report

Environment
Jenkins: 2.387.3
OS: Linux - 5.19.0-40-generic
Java: 11.0.11 - AdoptOpenJDK (OpenJDK 64-Bit Server VM)
---
ansicolor:1.0.2
antisamy-markup-formatter:159.v25b_c67cd35fb_
apache-httpcomponents-client-4-api:4.5.14-150.v7a_b_9d17134a_5
authentication-tokens:1.53.v1c90fd9191a_b_
blueocean:1.27.4
blueocean-autofavorite:1.2.5
blueocean-bitbucket-pipeline:1.27.4
blueocean-commons:1.27.4
blueocean-config:1.27.4
blueocean-core-js:1.27.4
blueocean-dashboard:1.27.4
blueocean-display-url:2.4.2
blueocean-events:1.27.4
blueocean-git-pipeline:1.27.4
blueocean-github-pipeline:1.27.4
blueocean-i18n:1.27.4
blueocean-jwt:1.27.4
blueocean-personalization:1.27.4
blueocean-pipeline-api-impl:1.27.4
blueocean-pipeline-editor:1.27.4
blueocean-pipeline-scm-api:1.27.4
blueocean-rest:1.27.4
blueocean-rest-impl:1.27.4
blueocean-web:1.27.4
bootstrap4-api:4.6.0-5
bootstrap5-api:5.2.2-3
bouncycastle-api:2.27
branch-api:2.1071.v1a_188a_562481
build-timeout:1.30
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
checks-api:2.0.0
cloudbees-bitbucket-branch-source:800.va_b_b_9a_a_5035c1
cloudbees-folder:6.815.v0dd5a_cb_40e0e
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
copyartifact:698.v393f578eb_ddc
credentials:1254.vb_96f366e7b_a_d
credentials-binding:604.vb_64480b_c56ca_
data-tables-api:1.13.3-3
discord-notifier:227.v10b_a_efb_cc874
display-url-api:2.3.7
docker-commons:419.v8e3cd84ef49c
durable-task:506.v1b_3e14b_6f5da_
echarts-api:5.4.0-3
external-monitor-job:203.v683c09d993b_9
favorite:2.4.1
font-awesome-api:6.3.0-2
git:5.0.1
git-client:4.2.0
gitea:1.4.5
github:1.37.0
github-api:1.303-417.ve35d9dd78549
github-branch-source:1703.vd5a_2b_29c6cdc
global-slack-notifier:1.5
handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953
htmlpublisher:1.31
instance-identity:142.v04572ca_5b_265
ionicons-api:45.vf54fca_5d2154
jackson2-api:2.15.0-334.v317a_165f9b_7c
jakarta-activation-api:2.0.1-3
jakarta-mail-api:2.0.1-3
javax-activation-api:1.2.0-6
javax-mail-api:1.6.2-9
jaxb:2.3.8-1
jdk-tool:66.vd8fa_64ee91b_d
jenkins-design-language:1.27.4
jjwt-api:0.11.5-77.v646c772fddb_0
jnr-posix-api:3.1.16-2
jquery3-api:3.6.4-1
jsch:0.2.8-65.v052c39de79b_2
junit:1202.v79a_986785076
lockable-resources:1156.v5e9f897ece02
mailer:448.v5b_97805e3767
mapdb-api:1.0.9-28.vf251ce40855d
matrix-auth:3.1.7
matrix-project:789.v57a_725b_63c79
metrics:4.2.13-420.vea_2f17932dd6
mina-sshd-api-common:2.9.2-62.v199162f0a_2f8
mina-sshd-api-core:2.9.2-62.v199162f0a_2f8
okhttp-api:4.10.0-132.v7a_7b_91cef39c
pam-auth:1.10
pipeline-build-step:491.v1fec530da_858
pipeline-github-lib:42.v0739460cda_c4
pipeline-graph-analysis:202.va_d268e64deb_3
pipeline-groovy-lib:656.va_a_ceeb_6ffb_f7
pipeline-input-step:468.va_5db_051498a_4
pipeline-milestone-step:111.v449306f708b_7
pipeline-model-api:2.2131.vb_9788088fdb_5
pipeline-model-definition:2.2131.vb_9788088fdb_5
pipeline-model-extensions:2.2131.vb_9788088fdb_5
pipeline-rest-api:2.32
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2131.vb_9788088fdb_5
pipeline-stage-view:2.32
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.2.1
popper-api:1.16.1-3
popper2-api:2.11.6-2
pubsub-light:1.17
resource-disposer:0.22
scm-api:667.v8b_6e07cdc7f2
script-security:1244.ve463715a_f89c
simple-theme-plugin:160.vb_76454b_67900
slack:664.vc9a_90f8b_c24a_
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
sse-gateway:1.26
ssh-credentials:305.v8f4381501156
ssh-slaves:2.877.v365f5eb_a_b_eec
sshd:3.275.v9e17c10f2571
structs:324.va_f5d6774f3a_d
timestamper:1.25
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
workflow-aggregator:596.v8c21c963d92d
workflow-api:1213.v646def1087f9
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3659.v582dc37621d8
workflow-durable-task-step:1246.v5524618ea_097
workflow-job:1292.v27d8cc3e2602
workflow-multibranch:746.v05814d19c001
workflow-scm-step:408.v7d5b_135a_b_d49
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.45
Result: [Plugin:ansicolor, Plugin:antisamy-markup-formatter, Plugin:apache-httpcomponents-client-4-api, Plugin:authentication-tokens, Plugin:blueocean, Plugin:blueocean-autofavorite, Plugin:blueocean-bitbucket-pipeline, Plugin:blueocean-commons, Plugin:blueocean-config, Plugin:blueocean-core-js, Plugin:blueocean-dashboard, Plugin:blueocean-display-url, Plugin:blueocean-events, Plugin:blueocean-git-pipeline, Plugin:blueocean-github-pipeline, Plugin:blueocean-i18n, Plugin:blueocean-jwt, Plugin:blueocean-personalization, Plugin:blueocean-pipeline-api-impl, Plugin:blueocean-pipeline-editor, Plugin:blueocean-pipeline-scm-api, Plugin:blueocean-rest, Plugin:blueocean-rest-impl, Plugin:blueocean-web, Plugin:bootstrap4-api, Plugin:bootstrap5-api, Plugin:bouncycastle-api, Plugin:branch-api, Plugin:build-timeout, Plugin:caffeine-api, Plugin:checks-api, Plugin:cloudbees-bitbucket-branch-source, Plugin:cloudbees-folder, Plugin:command-launcher, Plugin:commons-lang3-api, Plugin:commons-text-api, Plugin:copyartifact, Plugin:credentials, Plugin:credentials-binding, Plugin:data-tables-api, Plugin:discord-notifier, Plugin:display-url-api, Plugin:docker-commons, Plugin:durable-task, Plugin:echarts-api, Plugin:external-monitor-job, Plugin:favorite, Plugin:font-awesome-api, Plugin:git, Plugin:git-client, Plugin:gitea, Plugin:github, Plugin:github-api, Plugin:github-branch-source, Plugin:global-slack-notifier, Plugin:handy-uri-templates-2-api, Plugin:htmlpublisher, Plugin:instance-identity, Plugin:ionicons-api, Plugin:jackson2-api, Plugin:jakarta-activation-api, Plugin:jakarta-mail-api, Plugin:javax-activation-api, Plugin:javax-mail-api, Plugin:jaxb, Plugin:jdk-tool, Plugin:jenkins-design-language, Plugin:jjwt-api, Plugin:jnr-posix-api, Plugin:jquery3-api, Plugin:jsch, Plugin:junit, Plugin:lockable-resources, Plugin:mailer, Plugin:mapdb-api, Plugin:matrix-auth, Plugin:matrix-project, Plugin:metrics, Plugin:mina-sshd-api-common, Plugin:mina-sshd-api-core, Plugin:okhttp-api, Plugin:pam-auth, Plugin:pipeline-build-step, Plugin:pipeline-github-lib, Plugin:pipeline-graph-analysis, Plugin:pipeline-groovy-lib, Plugin:pipeline-input-step, Plugin:pipeline-milestone-step, Plugin:pipeline-model-api, Plugin:pipeline-model-definition, Plugin:pipeline-model-extensions, Plugin:pipeline-rest-api, Plugin:pipeline-stage-step, Plugin:pipeline-stage-tags-metadata, Plugin:pipeline-stage-view, Plugin:plain-credentials, Plugin:plugin-util-api, Plugin:popper-api, Plugin:popper2-api, Plugin:pubsub-light, Plugin:resource-disposer, Plugin:scm-api, Plugin:script-security, Plugin:simple-theme-plugin, Plugin:slack, Plugin:snakeyaml-api, Plugin:sse-gateway, Plugin:ssh-credentials, Plugin:ssh-slaves, Plugin:sshd, Plugin:structs, Plugin:timestamper, Plugin:token-macro, Plugin:trilead-api, Plugin:variant, Plugin:workflow-aggregator, Plugin:workflow-api, Plugin:workflow-basic-steps, Plugin:workflow-cps, Plugin:workflow-durable-task-step, Plugin:workflow-job, Plugin:workflow-multibranch, Plugin:workflow-scm-step, Plugin:workflow-step-api, Plugin:workflow-support, Plugin:ws-cleanup]

What Operating System are you using (both controller, and any agents involved in the problem)?

Ubuntu, no agents.

Reproduction steps

Run a job with the a post step like this:

    post {
        always {
            discordSend description: "Build took ${currentBuild.durationString}".replaceAll(" and counting", ""), footer: "", link: env.BUILD_URL, result: currentBuild.currentResult, title: JOB_NAME, webhookURL: "https://discord.com/api/webhooks/1..."
        }
    }

Expected Results

The plugin would post to Discord

Actual Results

The pipeline failed because of this error

[Pipeline] { (Declarative: Post Actions)
[Pipeline] discordSend
Sending notification to Discord.
Error when executing always post condition:
Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: c42d8471-a496-43e2-9ace-8c5ec33842dc
java.lang.NullPointerException
	at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:258)
	at nz.co.jammehcow.jenkinsdiscord.DiscordPipelineStep$DiscordPipelineStepExecution.run(DiscordPipelineStep.java:198)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
	at hudson.security.ACL.impersonate2(ACL.java:451)
	at hudson.security.ACL.impersonate(ACL.java:463)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

[Pipeline] }
[Pipeline] // stage

Anything else?

No response

Discord doesn't notify me when a message with mention has arrived.

Hi, thanks for this plugin is awesome.

We are a team with 10 people into a Discord Server, but we dont want to advice to all when a fail or succeed has been occurred. We mute the channel and only the interested people must read it.

The problem is every time that we receive a message from Jenkins, the mentions are not accumulated into the Discord mentions area. appears empty.

mentions

But the message appears ok with the name of the user.
Discord mention

Again, Thanks.

NPE preventing successful build notification

Jenkins and plugins versions report

Environment
Jenkins: 2.319.2
OS: Windows 10 - 10.0
---
ace-editor:1.1
antisamy-markup-formatter:2.7
apache-httpcomponents-client-4-api:4.5.13-1.0
bootstrap4-api:4.6.0-3
bootstrap5-api:5.1.3-4
bouncycastle-api:2.25
branch-api:2.7.0
build-timeout:1.20
caffeine-api:2.9.2-29.v717aac953ff3
checks-api:1.7.2
cloudbees-folder:6.17
command-launcher:1.6
conditional-buildstep:1.4.1
credentials:1074.v60e6c29b_b_44b_
credentials-binding:1.27.1
dashboard-view:2.18
discord-notifier:205.v893fce17f6cd
display-url-api:2.3.5
durable-task:493.v195aefbb0ff2
echarts-api:5.2.2-2
external-monitor-job:191.v363d0d1efdf8
font-awesome-api:5.15.4-5
git:4.10.3
git-client:3.11.0
git-server:1.10
github:1.34.1
github-api:1.301-378.v9807bd746da5
github-branch-source:2.11.4
handlebars:3.0.8
jackson2-api:2.13.1-246.va8a9f3eaf46a
javadoc:1.6
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-5
jaxb:2.3.0.1
jdk-tool:1.5
jjwt-api:0.11.2-9.c8b45b8bb173
jnr-posix-api:3.1.7-1
jquery-detached:1.2.1
jquery3-api:3.6.0-2
jsch:0.1.55.2
junit:1.53
ldap:2.7
lockable-resources:2.13
log-parser:2.2
mailer:408.vd726a_1130320
matrix-auth:3.0.1
matrix-project:1.20
maven-plugin:3.16
momentjs:1.1.1
okhttp-api:4.9.3-105.vb96869f8ac3a
pam-auth:1.7
pipeline-build-step:2.15
pipeline-github-lib:36.v4c01db_ca_ed16
pipeline-graph-analysis:188.v3a01e7973f2c
pipeline-input-step:446.vf27b_0b_83500e
pipeline-milestone-step:1.3.2
pipeline-model-api:1.9.3
pipeline-model-definition:1.9.3
pipeline-model-extensions:1.9.3
pipeline-rest-api:2.21
pipeline-stage-step:291.vf0a8a7aeeb50
pipeline-stage-tags-metadata:1.9.3
pipeline-stage-view:2.21
plain-credentials:1.8
plugin-util-api:2.13.0
popper-api:1.16.1-2
popper2-api:2.11.2-1
preSCMbuildstep:0.3
publish-over:0.22
publish-over-dropbox:1.3.2
resource-disposer:0.17
run-condition:1.5
scm-api:595.vd5a_df5eb_0e39
script-security:1131.v8b_b_5eda_c328e
snakeyaml-api:1.29.1
ssh-credentials:1.19
ssh-slaves:1.33.0
sshd:3.1.0
structs:308.v852b473a2b8c
timestamper:1.17
token-macro:267.vcdaea6462991
trilead-api:1.0.13
unity3d-plugin:1.3
windows-slaves:1.8
workflow-aggregator:2.6
workflow-api:1136.v7f5f1759dc16
workflow-basic-steps:2.24
workflow-cps:2648.va9433432b33c
workflow-cps-global-lib:552.vd9cc05b8a2e1
workflow-durable-task-step:1121.va_65b_d2701486
workflow-job:1145.v7f2433caa07f
workflow-multibranch:706.vd43c65dec013
workflow-scm-step:2.13
workflow-step-api:622.vb_8e7c15b_c95a_
workflow-support:813.vb_d7c3d2984a_0
ws-cleanup:0.40

What Operating System are you using (both controller, and any agents involved in the problem)?

OS: Windows 10 - 10.0

Reproduction steps

image
With this configuration I get a proper notification when the build starts and I never get a notification when the build ends. There's a NPE in the logs when the notification should be sent upon build completion.

Expected Results

I expected the Discord notification to be sent without exception.

Actual Results

10:37:21 ERROR: Build step failed with exception
10:37:21 java.lang.NullPointerException
10:37:21 	at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1770)
10:37:21 	at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
10:37:21 	at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
10:37:21 	at java.base/java.util.regex.Pattern.matcher(Pattern.java:1133)
10:37:21 	at java.base/java.util.Formatter.parse(Formatter.java:2700)
10:37:21 	at java.base/java.util.Formatter.format(Formatter.java:2655)
10:37:21 	at java.base/java.util.Formatter.format(Formatter.java:2609)
10:37:21 	at java.base/java.lang.String.format(String.java:2897)
10:37:21 	at nz.co.jammehcow.jenkinsdiscord.util.EmbedDescription.<init>(EmbedDescription.java:50)
10:37:21 	at nz.co.jammehcow.jenkinsdiscord.WebhookPublisher.perform(WebhookPublisher.java:300)
10:37:21 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
10:37:21 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
10:37:21 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
10:37:21 	at hudson.model.Build$BuildExecution.cleanUp(Build.java:188)
10:37:21 	at hudson.model.Run.execute(Run.java:1935)
10:37:21 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
10:37:21 	at hudson.model.ResourceController.execute(ResourceController.java:99)
10:37:21 	at hudson.model.Executor.run(Executor.java:432)
10:37:21 Build step 'Discord Notifier' marked build as failure
10:37:21 Finished: SUCCESS

Anything else?

No response

Feature Request: Parity with pipeline implementation

Things like the newly added notes field and attaching logs, displaying changesets dont work for the pipeline implementation. It would be amazing if we could get the pipeline version to the same feature level as the standard implementation.

Thanks keep up the good work!

Plugin not showing under configuration -> source management after installation

Jenkins and plugins versions report

Environment
Paste the output here

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows

Reproduction steps

Install plugin
restart jenkins
Project -> configure -> source managment -> discord webhook must be displayed

Expected Results

Project -> configure -> source managment -> discord webhook must be displayed

Actual Results

Project -> configure -> source managment -> discord webhook is not displayed

Anything else?

No response

Make status color customizable

What feature do you want to see added?

Currently the build status is read from a hardcoded enum, I think it would be nice to have four additional fields added to the menu where you can customize the colors of the currently named green, yellow, red and grey field.
To not break existing setups, the current color could be added as default.

Upstream changes

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.