Comments (20)
I have started working on a new major version, it will:
- Make the plugin compatible with LTS Jenkins version
- Bump the minimal Jenkins version to 2.387.3
- Bump the minimal Java version to 11
- Migrate away from apache commons http client to java.net http client
I have bulk of the work done. I just need to adjust the unit tests and give this a proper test flight before shipping the new version. Will keep you posted.
from zulip-plugin.
Thanks for reporting and apologies for the inconvenience. I'll try to come up with a quick fix this week (adding the commons HttpClient dependency).
from zulip-plugin.
Thanks a lot for testing it @epaul13!
The certificate chain validation is correct and afaik it was performed also with the Apache http client. Let me know if you think this is behaving differently than before.
I was also testing on my end today and verified several scenarios including proxy being setup in Jenkins both with and without authentication.
I think we are good to go, will most probably do the release tomorrow.
from zulip-plugin.
Resolved in version 2.0.0
from zulip-plugin.
I tried add а dependency for plugin commons-httpclient3-api to pom. I builded .hpi
and tested it in my jenkins server(v. 2.386) and it worked successful, BUT unit-tests were failed. I am going to try fix a problem with tests.
from zulip-plugin.
This release of Jenkins just hide the wider apt repositories in Ubuntu, so I hit this bug today when I upgraded.
Is there a quick way to fix this locally? I can still in the Commons HttpClient 3.x API Plugin, but that alone doesn't appear sufficient.
from zulip-plugin.
@jamesvl You can pull my fork and execute mvn hpi:hpi
for build a hpi file. After you can manually install it. See https://www.jenkins.io/doc/book/managing/plugins/ for more details.
from zulip-plugin.
@butchyyyy you mentioned that you would be looking at this. Any chance to get this fixed?
from zulip-plugin.
@ipikiiskinen @epaul13 I didn't try to use my fork with latest Jenkins, maybe it doesn't work. I am going to update Jenkins and test it later.
My env:
centos-release-7-9.2009.1.el7.centos.x86_64
openjdk 11.0.17 2022-10-18 LTS
jenkins 2.386
from zulip-plugin.
^^ The PR is up, all unit and integration tests are passing.
There are more or less no functional changes besides the http client migration. The rest is mostly formatting stuff and test migration away from Powermock.
I still need to run some manual testing against Jenkins + Zulip before I release this. If anyone has time to also give the branch a quick test and report any issues, it will be much appreciated.
Of course feel free to leave comments on the PR as well, it's first Java code I did in ~4 years 🙈
from zulip-plugin.
Thanks a lot for testing it @epaul13! The certificate chain validation is correct and afaik it was performed also with the Apache http client. Let me know if you think this is behaving differently than before.
I was also testing on my end today and verified several scenarios including proxy being setup in Jenkins both with and without authentication.
I think we are good to go, will most probably do the release tomorrow.
Good news. For the certificate validation, my bad. I tested on a brand-new container, and my old jenkins is probably ten years old. I just checked and I have the same chain on the old server. So everything' good!
from zulip-plugin.
It seems in the changelog of Jenkins the reason for this issue is mentioned:
What's new in 2.379 (2022-11-22)
Jenkins no longer bundles a patched version of the deprecated Commons HttpClient 3.x library for use by plugins.
Plugins should be migrated to the native Java 11 HTTP client or updated to depend on the legacy Commons HttpClient 3.x API plugin.
from zulip-plugin.
@butchyyyy do you have time to investigate this?
In any case, pull requests are welcome.
from zulip-plugin.
FWIW I tried switch to java.net.http
client which requires upgrading to java 11+. I had problems with the tests: powermock, mokito, … are not compatible.
If you want, I can share my work as WIP.
from zulip-plugin.
Quick fix is to add pom dependency for plugin commons-httpclient3-api (https://plugins.jenkins.io/commons-httpclient3-api/)
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-httpclient3-api</artifactId>
<version>3.1-3</version>
</dependency>
from zulip-plugin.
@EvgenyKuzavlev: I used your fork and build it with last maven without problems. After copying the zulip.hpi to plugins/zulip.jpi, the plugin is correctly loaded, but the global configuration and post-build step are not showing up. Any clue?
Note:
Maven home: /opt/apache-maven-3.9.1
Java version: 11.0.18, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.15.104-1-pve", arch: "amd64", family: "unix"
from zulip-plugin.
@EvgenyKuzavlev
I also used your fork and build it with:
$ mvn --version Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8) Maven home: /opt/apache-maven-3.9.1 Java version: 11.0.18, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-1.el7_9.x86_64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-1160.88.1.el7.x86_64", arch: "amd64", family: "unix"
I got the same results as @epaul13
Plugin does not report any error in start up, gets listed as installed plugin, but it does not show in global config or in build definitions.
Tested with the latest Jenkins LTS release 2.387.3 (RedHat 7 RPM installation) and openjdk version "11.0.19" 2023-04-18 LTS
@EvgenyKuzavlev Have you managed to the get the plugin working with the latest LTS Jenkins?
from zulip-plugin.
Any news? I can try to make a correction, but my java is rusted, and I don't know maven nor Jenkins dev env... Might not be the most efficient move :)
from zulip-plugin.
I checked out your PR and tested it. I have now access to global configuration and project post-build actions. Great work!
At first, I was unable to get any messages, with an error in Jenkins logs:
#011SEVERE#011jenkins.plugins.zulip.Zulip#post: Error sending Zulip message:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I had to add my zulip server chain certificate to make it work. On Ubuntu 22.04, it means:
sudo cp zulip.combined-chain.crt /usr/local/share/ca-certificates
sudo update-ca-certificates
sudo /var/lib/dpkg/info/ca-certificates-java.postinst configure
sudo systemctl restart jenkins
Now I get my jenkins post messages from Jenkins!
Thank you again!
So this work on Jenkins 2.387.3 on java 11.0.18 on Ubuntu 22.04
To build, for maven/jenkins devenv noobs like me:
git clone https://github.com/jenkinsci/zulip-plugin.git
cd zulip-plugin/
git checkout origin/version2
mvn package
# uninstall previous zulip plugin
sudo -u jenkins cp target/zulip.hpi /var/lib/jenkins/plugins/
sudo systemctl restart jenkins
with:
mvn --version
Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /opt/apache-maven-3.9.1
Java version: 11.0.18, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.15.104-1-pve", arch: "amd64", family: "unix"
from zulip-plugin.
Thank You @butchyyyy ! ❤️
from zulip-plugin.
Related Issues (20)
- build of zulip-plugin fails because of deprecated method getTestResultAction HOT 3
- Post-Build-Action not available - Zulip Notification HOT 7
- Enable Smart Notification is always selected HOT 2
- Plugin Version 1.0.1 does not sent any notifications to Zulip HOT 6
- Environment variables are not resolved HOT 2
- Project missing LICENSE file. HOT 1
- Feature request: possibility to configure smart notifications per Jenkins job. HOT 3
- Zulip notifications in one job are blocked by the other job HOT 1
- FYI, Zulip bot for run jenkins job via trigger url
- Failed builds should use :cross_mark: rather than :x: HOT 5
- send notification if build status changes from before. HOT 1
- Project name is not very clear in notifications for multi-branch pipeline projects
- Does not work with Jenkins 2.387.1 HOT 1
- In a multi-configuration project with an agent axis, the default topic is the name of the agent, not the name of the project/job. HOT 8
- No credentials provided - after upgrading to version 2 HOT 22
- Add send test message button into plugin configuration
- java.lang.NoClassDefFoundError: HOT 2
- Jenkins Pipepline syntax HOT 4
- Blank project topic will override topic from global configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zulip-plugin.