Comments (8)
Thanks for reporting @epaul13
Am I correct to assume this is regression in version 2.0.0? If yes I think I know which change probably caused this. Either way it would be great to get some screen shots of the configuration and the messages you are getting in Zulip so that I can reproduce on my instance.
from zulip-plugin.
Ok, so I have set up Matrix project called "multi" with agent X axis:
I have added the Zulip notifier step with empty topic:
I have disabled full job paths in the project configuration:
When I run the build, the notifications are posted into built-in
and my-agent
topics
There are no smarts around multi project configuration in the plugin, the default topic logic is to get the build's direct parent display name (unless you have the use full job path options on in which case it iterates / uses the whole parent chain).
What would you imagine to be the correct topic name in such configured project?
Note for variables like $JOB_NAME: The plugin only expands variables in strings with values provided by Jenkins, it has no control over variable content.
from zulip-plugin.
Thanks for providing the details, the logic behind that is:
- If you are using fixed topic name, the idea is that you can have multiple jobs messaging single topic and that's why the
Project: <job_display_name>
is included in the message. - If the topic is blank, the
<job_display_name>
is used as a topic name and we no longer include it into the message itself, as it would be a duplicate information.
IUUC the problem in your case is that the <job_display_name>
only includes build run direct parent which is the Jenkins agent in this case.
For this use case, the plugin has the Use full job path ...
options.
Option with blank topic
If you use following configuration
Plugin will post into a multi ยป built-in
topic, where multi
is the matrix project name and built-in
is the agent name
Option with fixed topic
If you use following configuration
Plugin will post into fixedtopic
, but the message will include full project name
Does either of these options work for you?
from zulip-plugin.
By the way, looking at your previous answer, it seems that you don't have the same behavior as me? IIUC, you get the correct info without checking any of the "Use full job path" options, right?
Nope, it behaves same as for you, e.g. with blank topic I get just the agent name and build number and no project info:
My point was that without configuring anything, the "parsing" of a "full job name" leads to display the agent name and not the job name in the topic, and I get no info on which project failed.
Fair point, actually your report is the same as #31, just for matrix project instead of multi branch pipeline. Based on this the full job path options were introduced.
I think that the conclusion of this ticket are two action items for me:
- Document the full job path options in plugin README
- Enable the full job paths options by default for new installations as they just make sense for stuff like matrix projects or multi branch pipelines while not affecting simple job topic / messaging.
from zulip-plugin.
Hi,
thank you for the fast answer.
Well, I'm perfectly fine with the message you get :)
The first one is with $JOB_NAME configured in "topic name", the second with nothing configured for "topic name" in the main Jenkins configuration:
with multi:
As you see, I use $JOB_NAME to get my project info in the topic, which is fine. But Then the project in the message body is not good. If I don't use $JOB_NAME, the topic only shows the node and I only have the build in the body, which is not convenient to know which project failed ;)
As I said, I'm fine with what you get on your side :)
Tell me if you need more information.
Eric.
from zulip-plugin.
I get the logic, fine for me.
If I use one of the "Use full job path" options, I get the information, fine too:
My point was that without configuring anything, the "parsing" of a "full job name" leads to display the agent name and not the job name in the topic, and I get no info on which project failed. I can get the information either by using the fixed topic "$JOB_NAME" (but then the body of the message display the agent name not the project name) or by configuring one of the "Use full job path" options. That's fine for me, I get my information.
For the record, I'll use:
This way I get the info in the topic and I can click the build number to go to the failed build.
Nevertheless, I think this might be considered a "bug" or an inconvenience. That's why I decided to report. :)
By the way, looking at your previous answer, it seems that you don't have the same behavior as me? IIUC, you get the correct info without checking any of the "Use full job path" options, right?
In any case, I get what I need, you have a useful plugin and do a great support, thank you again!
Eric.
from zulip-plugin.
Seems like a good move. It's a pity there's no clear pattern or var to get the job's name. Extracting it depending on project's type through retro-engineering seems overkill ;-)
Thanks again for the support!
from zulip-plugin.
Readme adjusted in d4b9acf
Full job paths and smart notify enabled by default for new installations in df49757
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
- After upgrading Jenkins, the plugin dosen't work anymore HOT 20
- Does not work with Jenkins 2.387.1 HOT 1
- 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.