jenkinsci / zulip-plugin Goto Github PK
View Code? Open in Web Editor NEWJenkins plugin for Zulip notifications of build status
Home Page: https://zulip.com/integrations/doc/jenkins
License: MIT License
Jenkins plugin for Zulip notifications of build status
Home Page: https://zulip.com/integrations/doc/jenkins
License: MIT License
When I use the ZulipNotifier
in a multi-branch pipeline project, I get notifications that look like this:
Project: production : Build: #1: SUCCESS
Project: staging : Build: #3: SUCCESS
The "project name" in these examples is in fact the branch name. That's because, for multi-branch pipeline projects, one sub-project is created for each branch, and this sub-project has the same name as the branch.
This notification message is not very clear, since it doesn't allow to identify the failing Jenkins job.
Ideally we should make the message clearer?
Jenkins and plugins versions report:
Jenkins: 2.289.2
OS: Linux - 4.18.0-305.7.1.el8_4.x86_64
---
jaxb:2.3.0.1
pipeline-milestone-step:1.3.2
cloudbees-folder:6.15
branch-api:2.6.5
jdk-tool:1.5
script-security:1.77
docker-commons:1.17
structs:1.23
momentjs:1.1.1
workflow-step-api:2.24
scm-api:2.6.4
docker-workflow:1.26
workflow-api:2.46
junit:1.51
command-launcher:1.6
pipeline-stage-view:2.19
bouncycastle-api:2.20
gradle:1.37.1
antisamy-markup-formatter:2.1
token-macro:2.15
build-timeout:1.20
credentials:2.5
pipeline-build-step:2.13
plain-credentials:1.7
ssh-credentials:1.19
pipeline-model-api:1.8.5
credentials-binding:1.27
workflow-support:3.8
durable-task:1.38
workflow-durable-task-step:2.39
matrix-project:1.19
jsch:0.1.55.2
resource-disposer:0.16
github-api:1.123
ws-cleanup:0.39
ace-editor:1.1
jquery-detached:1.2.1
git-client:3.8.0
workflow-scm-step:2.13
git:4.7.2
workflow-cps:2.93
workflow-job:2.41
github:1.33.1
apache-httpcomponents-client-4-api:4.5.13-1.0
display-url-api:2.3.5
mailer:1.34
git-server:1.10
workflow-basic-steps:2.23
jackson2-api:2.12.3
workflow-cps-global-lib:2.21
pipeline-input-step:2.12
pipeline-stage-step:2.5
pipeline-graph-analysis:1.11
pipeline-rest-api:2.19
handlebars:3.0.8
pipeline-model-extensions:1.8.5
blueocean-git-pipeline:1.24.7
workflow-multibranch:2.26
blueocean-jwt:1.24.7
authentication-tokens:1.4
h2-api:1.4.199
pipeline-stage-tags-metadata:1.8.5
favorite:2.3.3
pipeline-model-definition:1.8.5
lockable-resources:2.11
workflow-aggregator:2.6
github-branch-source:2.11.1
pipeline-github-lib:1.0
matrix-auth:2.6.7
sse-gateway:1.24
email-ext:2.83
embeddable-build-status:2.0.3
blueocean-config:1.24.7
config-file-provider:3.8.1
throttle-concurrents:2.3
blueocean-events:1.24.7
github-oauth:0.33
windows-slaves:1.8
ant:1.11
ghprb:1.42.2
jquery:1.12.4-1
javadoc:1.6
pam-auth:1.6
ldap:2.7
external-monitor-job:1.7
pubsub-light:1.16
blueocean-pipeline-scm-api:1.24.7
htmlpublisher:1.25
node-iterator-api:1.5.0
variant:1.4
zulip:1.2.1
aws-java-sdk:1.11.995
blueocean-dashboard:1.24.7
aws-credentials:1.29
doclinks:0.6.1
ec2:1.62
blueocean-jira:1.24.7
authorize-project:1.4.0
ssh-agent:1.23
maven-plugin:3.12
envinject-api:1.7
audit-trail:3.8
jobConfigHistory:2.28.1
jira:3.5
simple-theme-plugin:0.7
PrioritySorter:4.0.0
blueocean-rest-impl:1.24.7
jenkins-design-language:1.24.7
blueocean-display-url:2.4.1
blueocean-core-js:1.24.7
blueocean-commons:1.24.7
blueocean-rest:1.24.7
blueocean-web:1.24.7
ssh-slaves:1.32.0
postbuildscript:3.0.0
conditional-buildstep:1.4.1
parameterized-trigger:2.41
database-mysql:1.4
run-condition:1.5
blueocean-autofavorite:1.2.4
database:1.9
trilead-api:1.0.13
pipeline-github:2.7
pipeline-utility-steps:2.8.0
notification:1.15
pipeline-maven:3.10.0
snakeyaml-api:1.29.1
greenballs:1.15.1
blueocean-pipeline-api-impl:1.24.7
blueocean-github-pipeline:1.24.7
blueocean-personalization:1.24.7
blueocean-i18n:1.24.7
envinject:2.4.0
mysql-api:8.0.16
openshift-client:1.0.35
plugin-util-api:2.4.0
jmh-report:0.9.0
toolenv:1.2
warnings-ng:9.4.0
caffeine-api:2.9.1-23.v51c4e2c879c8
bootstrap5-api:5.0.2-1
jquery3-api:3.6.0-2
analysis-model-api:10.2.5
font-awesome-api:5.15.3-4
popper2-api:2.5.4-3
data-tables-api:1.10.25-2
popper-api:1.16.1-2
sshd:3.0.4
jjwt-api:0.11.2-9.c8b45b8bb173
echarts-api:5.1.2-3
checks-api:1.7.2
okhttp-api:3.14.9
forensics-api:1.2.1
bootstrap4-api:4.6.0-3
RHEL 8 on controller, Fedora 34 on agents.
Expected result:
The notification should include the project name and branch, e.g.:
Project: hibernate.org ยป production : Build: #1: SUCCESS
Actual result:
The notification does not include the project name, only the branch name, e.g.:
Project: production : Build: #1: SUCCESS
It would be nice (and helpfull) if the number of broken tests is added to the message that currently is sent to Zulip.
It would be nice to have the ability to configure the smart notification property per Jenkins Job.
There are two possibilities:
My zulip server is on a non UPS protected machine, so every now and again the zulip instance goes down. I want to be able to "ignore" failure to post to zulip - i.e. write some warning in the console output of the log but not actually fail the build
If there are 2 jobs and one of them finishes earlier then Zulip notifications block until the other job finishes too. Exactly the same issue was fixed in the Slack plugin. Fix for Zulip plugin is exactly the same. getRequiredMonitorService
should return BuildStepMonitor.NONE
. I tested it on my Jenkins.
How do I send a message to Zulip in a Jenkins Pipeline (Jenkinsfile
) ? For example this is how I would do it with hipchat (https://github.com/jenkinsci/hipchat-plugin):
pipeline {
agent any
stages {
stage('Notify Start') {
steps {
hipchatSend(color: 'GRAY', message: "<a href=\"${RUN_DISPLAY_URL}\">Web Job ${env.BUILD_NUMBER} on ${env.BRANCH_NAME} started</a>")
}
}
stage('Automated Tests') {
steps {
sh '''# my tests
'''
junit 'tests/_output/run'
}
post {
unstable {
hipchatSend(color: 'RED', notify: true, message: "<a href=\"${RUN_DISPLAY_URL}\">Some tests in web job ${env.BUILD_NUMBER} on ${env.BRANCH_NAME} failed</a>")
}
success {
hipchatSend(color: 'GREEN', notify: false, message: "<a href=\"${RUN_DISPLAY_URL}\">All tests in web job ${env.BUILD_NUMBER} on ${env.BRANCH_NAME} passed</a>")
}
}
}
stage('Build and Release') {
when {
tag 'release_*'
}
post {
failure {
hipchatSend(color: 'RED', notify: true, message: "<a href=\"${RUN_DISPLAY_URL}\">Build web job ${env.BUILD_NUMBER} on ${env.BRANCH_NAME} failed</a>")
}
}
steps {
sh "# build"
}
}
stage('Notify Deployment') {
when {
tag 'release_*'
}
steps {
hipchatSend(color: 'GREEN', notify: false, message: "Web Job ${env.BRANCH_NAME} deployed")
}
}
}
}
I also noticed that the Zulip plugin is not showing as an option in the blueocean pipeline editor so maybe this is not supported?
Hello,
currently, it seems that the plugin only allows using a fixed value for the stream/topic name (I'm using the "Zulip notification" post-build action, if that matters).
It would be really nice to be able to use environment variables (e.g. $BRANCH_NAME in order to dynamically change where the zulip notification is being posted to.
Thanks!
Rather than only letting you configure servers of the form xyz.zulip.com, you should be able to specify an arbitrary server in the configuration field.
Hello,
when we use the zulip notification plugin but on the end of a build we always get the following error message:
java.lang.ClassNotFoundException: org.apache.commons.httpclient.Credentials
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:594)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:527)
Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentials
at jenkins.plugins.zulip.ZulipNotifier.publish(ZulipNotifier.java:133)
at jenkins.plugins.zulip.ZulipNotifier.perform(ZulipNotifier.java:81)
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.post2(Build.java:179)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711)
at hudson.model.Run.execute(Run.java:1925)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
I have already checked if the bot has sufficient permissions to send to a stream and verified it via curl, which works.
Our configuration is that the build-job, which atm. is just a job which tries to send a messages to a stream, is being executed on a jenkins node.
The node has the following java versions installed:
javac -version
javac 11.0.19
java -version
openjdk version "11.0.19" 2023-04-18
OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
I already tried different bots in different streams etc. but every job runs into the same error as stated above. In the documentation i couldnr find any hints about how to troubleshoot this error.
Maybe anyone here can help.
Regards
A bug in the posting to fixed topic functionality introduced in #8 PR
When topic is configured in the global configuration, but left blank in project configuration, the global configuration is ignored and messages are posted to the project name topic.
The bug affects only the publisher, not the send step.
Jenkins: 2.387.3
OS: Linux - 5.15.104-1-pve
Java: 11.0.18 - Ubuntu (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
bootstrap5-api:5.3.0-1
bouncycastle-api:2.28
build-timeout:1.31
caffeine-api:3.1.6-115.vb_8b_b_328e59d8
categorized-view:1.12
checks-api:2.0.0
claim:516.v36293563731d
command-launcher:100.v2f6722292ee8
commons-lang3-api:3.12.0-36.vd97de6465d5b_
commons-text-api:1.10.0-36.vc008c8fcda_7b_
configuration-as-code:1647.ve39ca_b_829b_42
credentials:1254.vb_96f366e7b_a_d
display-url-api:2.3.7
echarts-api:5.4.0-5
excludeMatrixParent:1.1
font-awesome-api:6.4.0-1
instance-identity:142.v04572ca_5b_265
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.2-350.v0c2f3f8fc595
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
jquery3-api:3.7.0-1
jsch:0.2.8-65.v052c39de79b_2
junit:1207.va_09d5100410f
ldap:682.v7b_544c9d1512
mailer:457.v3f72cb_e015e5
matrix-auth:3.1.8
matrix-project:789.v57a_725b_63c79
mercurial:1260.vdfb_723cdcc81
mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_
nodelabelparameter:1.12.0
plugin-util-api:3.3.0
role-strategy:633.v836e5b_3e80a_5
scm-api:672.v64378a_b_20c60
script-security:1251.vfe552ed55f8d
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
ssh-credentials:305.v8f4381501156
ssh-slaves:2.877.v365f5eb_a_b_eec
sshd:3.303.vefc7119b_ec23
structs:324.va_f5d6774f3a_d
timestamper:1.25
token-macro:359.vb_cde11682e0c
trilead-api:2.84.v72119de229b_7
view-job-filters:364.v48a_33389553d
workflow-api:1213.v646def1087f9
workflow-job:1308.v58d48a_763b_31
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
zulip:2.0.0-SNAPSHOT (private-262aa562-epaul)
Ubuntu 22.04 for the controller. 4 agents on Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04 and RHEL8.
I expect a message with the topic containing the projet/job name.
I get the agent name in the message topic.
If I configure $JOB_NAME for the topic, I get job_name/Agent=agent_name, which is fine, but then I get a Project: agent_name
link instead of Project: job_name
. The link is correct but not the label.
To prevent unnecessary sending of notifications, it is good to send if the build status changes from the previous status.
Currently the plugin only supports notifying one global stream.
We use "jenkins," but this gets messy as everyone looks to the one central stream.
It'd be nicer if we could have different Jenkins jobs routing their updates to different Humbug streams, like with the GitHub hook.
Jenkins: 2.412
OS: Linux - 5.4.0-153-generic
Java: 17.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
ace-editor:1.1
ansicolor:1.0.2
ant:497.v94e7d9fffa_b_9
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_
bootstrap4-api:4.6.0-6
bootstrap5-api:5.3.0-1
bouncycastle-api:2.28
branch-api:2.1122.v09cb_8ea_8a_724
build-timeout:1.31
build-user-vars-plugin:1.9
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_
credentials:1254.vb_96f366e7b_a_d
credentials-binding:604.vb_64480b_c56ca_
dark-theme:336.v02165cd8c2ee
data-tables-api:1.13.4-3
display-url-api:2.3.7
docker-commons:422.v9d1a_89cede51
docker-workflow:563.vd5d2e5c4007f
durable-task:507.v050055d0cb_dd
echarts-api:5.4.0-5
email-ext:2.99
envinject:2.901.v0038b_6471582
envinject-api:1.199.v3ce31253ed13
external-monitor-job:206.v9a_94ff0b_4a_10
font-awesome-api:6.4.0-1
git:5.1.0
git-client:4.4.0
git-server:99.va_0826a_b_cdfa_d
github:1.37.1
github-api:1.314-431.v78d72a_3fe4c3
github-branch-source:1728.v859147241f49
gitlab-plugin:1.7.14
global-slack-notifier:1.5
google-oauth-plugin:1.0.9
gradle:2.8.1
handlebars:3.0.8
instance-identity:173.va_37c494ec4e5
ionicons-api:56.v1b_1c8c49374e
jackson2-api:2.15.2-350.v0c2f3f8fc595
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
jersey2-api:2.40-1
jjwt-api:0.11.5-77.v646c772fddb_0
jquery:1.12.4-1
jquery-detached:1.2.1
jquery3-api:3.7.0-1
jsch:0.2.8-65.v052c39de79b_2
junit:1214.va_2f9db_3e6de0
kubernetes:3952.v88e3b_0cf300b_
kubernetes-cli:1.12.0
kubernetes-client-api:6.4.1-215.v2ed17097a_8e9
kubernetes-credentials:0.10.0
kubernetes-pipeline-devops-steps:1.6
ldap:682.v7b_544c9d1512
lockable-resources:1172.v4b_8fc8eed570
mailer:457.v3f72cb_e015e5
mapdb-api:1.0.9-28.vf251ce40855d
matrix-auth:3.1.8
matrix-project:789.v57a_725b_63c79
metrics:4.2.18-439.v86a_20b_a_8318b_
mina-sshd-api-common:2.10.0-69.v28e3e36d18eb_
mina-sshd-api-core:2.10.0-69.v28e3e36d18eb_
momentjs:1.1.1
oauth-credentials:0.645.ve666a_c332668
okhttp-api:4.11.0-145.vcb_8de402ef81
pam-auth:1.10
pipeline-build-step:496.v2449a_9a_221f2
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.2141.v5402e818a_779
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:2.2141.v5402e818a_779
pipeline-model-extensions:2.2141.v5402e818a_779
pipeline-rest-api:2.33
pipeline-stage-step:305.ve96d0205c1c6
pipeline-stage-tags-metadata:2.2141.v5402e818a_779
pipeline-stage-view:2.33
plain-credentials:143.v1b_df8b_d3b_e48
plugin-util-api:3.3.0
popper-api:1.16.1-3
popper2-api:2.11.6-2
postbuild-task:1.9
resource-disposer:0.22
saml:4.418.vdfa_7489a_b_a_2d
scm-api:676.v886669a_199a_a_
script-security:1251.vfe552ed55f8d
simple-theme-plugin:160.vb_76454b_67900
slack:664.vc9a_90f8b_c24a_
snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
sonar:2.15
ssh-credentials:305.v8f4381501156
ssh-slaves:2.877.v365f5eb_a_b_eec
sshd:3.303.vefc7119b_ec23
structs:324.va_f5d6774f3a_d
subversion:2.17.2
theme-manager:193.vcef22f6c5f2b_
timestamper:1.25
token-macro:359.vb_cde11682e0c
tool-labels-plugin:3.0
trilead-api:2.84.v72119de229b_7
variant:59.vf075fe829ccb
windows-slaves:1.8.1
workflow-aggregator:596.v8c21c963d92d
workflow-api:1219.v05cd837ea_249
workflow-basic-steps:1017.vb_45b_302f0cea_
workflow-cps:3697.vb_470e454c232
workflow-cps-global-lib:609.vd95673f149b_b
workflow-durable-task-step:1247.v7f9dfea_b_4fd0
workflow-job:1316.vd2290d3341a_f
workflow-multibranch:756.v891d88f2cd46
workflow-scm-step:415.v434365564324
workflow-step-api:639.v6eca_cd8c04a_a_
workflow-support:839.v35e2736cfd5c
ws-cleanup:0.45
zulip:2.0.0
Docker image jenkins/jenkins:latest-jdk17
. Here's the container base image info:
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
docker pull jenkins/jenkins:latest-jdk17
)Jenkins send messages by using zulipSend message
or zulipNotification
commands.
The message isn't sent. No any exceptions are raised during pipeline execution. This is the console output of Jenkins:
2023-07-02 19:25:54.251+0000 [id=310] SEVERE jenkins.plugins.zulip.Zulip#post: Error sending Zulip message:
java.io.IOException: No credentials provided
at java.net.http/jdk.internal.net.http.AuthenticationFilter.response(AuthenticationFilter.java:312)
at java.net.http/jdk.internal.net.http.MultiExchange.responseFilters(MultiExchange.java:248)
at java.net.http/jdk.internal.net.http.MultiExchange.lambda$responseAsyncImpl$6(MultiExchange.java:413)
at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:653)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at java.net.http/jdk.internal.net.http.HttpClientImpl$DelegatingExecutor.execute(HttpClientImpl.java:157)
at java.base/java.util.concurrent.CompletableFuture$UniCompletion.claim(CompletableFuture.java:572)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2147)
at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.handle(Http1Response.java:695)
at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.handle(Http1Response.java:621)
at java.net.http/jdk.internal.net.http.Http1Response$Receiver.accept(Http1Response.java:612)
at java.net.http/jdk.internal.net.http.Http1Response$HeadersReader.tryAsyncReceive(Http1Response.java:668)
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.flush(Http1AsyncReceiver.java:233)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230)
at java.net.http/jdk.internal.net.http.HttpClientImpl$DelegatingExecutor.execute(HttpClientImpl.java:157)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:305)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:274)
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver.asyncReceive(Http1AsyncReceiver.java:464)
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver$Http1TubeSubscriber.onNext(Http1AsyncReceiver.java:584)
at java.net.http/jdk.internal.net.http.Http1AsyncReceiver$Http1TubeSubscriber.onNext(Http1AsyncReceiver.java:541)
at java.net.http/jdk.internal.net.http.common.SSLTube$DelegateWrapper.onNext(SSLTube.java:210)
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onNext(SSLTube.java:492)
at java.net.http/jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper.onNext(SSLTube.java:295)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run1(SubscriberWrapper.java:316)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher.run(SubscriberWrapper.java:259)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:303)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:256)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:232)
at java.net.http/jdk.internal.net.http.common.SubscriberWrapper.outgoing(SubscriberWrapper.java:198)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader.processData(SSLFlowDelegate.java:444)
at java.net.http/jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher.run(SSLFlowDelegate.java:268)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask.run(SequentialScheduler.java:205)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask.run(SequentialScheduler.java:149)
at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:230)
Caused: java.io.IOException: No credentials provided
at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:586)
at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:123)
at jenkins.plugins.zulip.Zulip.post(Zulip.java:155)
at jenkins.plugins.zulip.Zulip.sendStreamMessage(Zulip.java:180)
at jenkins.plugins.zulip.ZulipSendStep.perform(ZulipSendStep.java:50)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
I checked out the Zulip API Key in Manage Jenkins > System > Zulip Notification Settings.
I inspected the Concealed Password, which returns the encoded API Key... and then I decoded it. It was correct. I changed the API key again. Unfortunately, nothing changed in result.
I setup a new Jenkins environment from scratch and installed Zulip Plugin in it. It worked in the new environment. However, I compared jenkins_home/jenkins.plugins.zulip.ZulipNotifier.xml
in both environments. There were no differences, except <api key>
tag, which were probably encoded with their own Jenkins master keys.
Hello,
the plugin version 1.0.1 does not send any notifications to Zulip.
We are using a self-hosted installation and have configured a freestyle job in Jenkins. The exceptions for the proxy are also configured.
When starting the freestyle job the plugin does not react and there is no console output.
Stream, topic, Bot E-Mail, Bot API are 100% correct.
Any ideas?
Paste the output here
Jenkins Docker Image.
In Version 2.378
, everything's fine. But after upgrading to Version 2.383
, it breaks.
It has been tested on both JDK 11
and JDK 17
.
Upgrade Jenkins to the latest version.
The message successfully send to Zulip.
The output of Jenkins pipeline, after running zulipSend message: 'some messages here'
java.lang.ClassNotFoundException: org.apache.commons.httpclient.Credentials
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentials
at jenkins.plugins.zulip.ZulipSendStep.perform(ZulipSendStep.java:44)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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] // catchError
[Pipeline] stage
[Pipeline] { (Notify)
[Pipeline] zulipNotification
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.ClassNotFoundException: org.apache.commons.httpclient.Credentials
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentials
at jenkins.plugins.zulip.ZulipNotifier.publish(ZulipNotifier.java:133)
at jenkins.plugins.zulip.ZulipNotifier.perform(ZulipNotifier.java:86)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
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)
Finished: FAILURE
No response
Linux - Ubuntu 20.04
When trying to send any message with the plugin we'll get the error
Error when executing failure post condition: java.lang.ClassNotFoundException: org.apache.commons.httpclient.Credentials at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476) at jenkins.util.URLClassLoader2.findClass(URLClassLoader2.java:35) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) Caused: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Credentials at jenkins.plugins.zulip.ZulipSendStep.perform(ZulipSendStep.java:44) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101) at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) 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)
This should work, the message should be sent
The exception is thrown
Probably related to this issue: #36
jenkins-chatbot and for back answer from jenkins used this zulip-plugin ๐
With Zulip's "Google modern" emoji theme (which I think is the default), in Zulip 3.1, the :x:
displays as a cross in a green box (seems to match Android 10: https://emojipedia.org/google/android-10.0/cross-mark-button/, Android 9 and Android 11 had/have a red cross in a black-bordered white box, looking like what was displayed in Zulip 2.x)
I'd suggest using :cross_mark:
instead, which is more consistently displayed in red: https://emojipedia.org/cross-mark/
Moreover, a successful build uses :check_mark:
, which is not in a box: https://emojipedia.org/check-mark/ so it would be more consistent.
Hello,
unfortunately I can't select a stream or a topic under Post-Build-Actions as described in the documentation for Zulip-Jenkins Plugin. Does anyone have an idea where the problem might be?
Here i'm missing stream and topic
In the documentation you can choose a stream and topic.
Documentation: https://zulipchat.com/integrations/doc/jenkins
Hi,
It would be good if the zulip plugin supported the job-dsl-plugin so that when we build our jobs via DSL we can enable Zulip notifications automatically.
https://github.com/jenkinsci/job-dsl-plugin/wiki/Extending-the-DSL
Thanks
Mark
Version 1.0.1
function "Enable Smart Notification" is always selected automatically and I don't get a notification if the build fails or if the build is okay.
I have entered a stream and a topic in the post-build configuration.
In the Zulip notification settings I have entered the zulip URL, Zulip User Email and the Zulip API Key.
A build of zulip-plugin failed with error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project humbug: Compilation failure
[ERROR] /var/lib/jenkins/zulip-plugin/src/main/java/hudson/plugins/humbug/HumbugNotifier.java:[104,38] cannot find symbol
[ERROR] symbol: method getTestResultAction()
[ERROR] location: variable build of type hudson.model.Run
According to https://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html the method is deprecated:
@deprecated
public Action getTestResultAction()
Deprecated. Use Actionable.getAction(Class) on AbstractTestResultAction.
To fix this I've added the following to pom.xml:
org.jenkins-ci.plugins
junit
1.7
and changed src/main/java/hudson/plugins/humbug/HumbugNotifier.java by adding the import
import hudson.tasks.test.AbstractTestResultAction;
and changing
int failCount = build.getTestResultAction().getFailCount();
to
int failCount = build.getAction(AbstractTestResultAction.class).getFailCount();
Introduce a Send test message
button into the global Zulip plugin configuration to make the setup verification more convenient (no need to run a build etc.).
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.