-
Notifications
You must be signed in to change notification settings - Fork 110
JENKINS-29637 - Ability to provide description for the task #138
Conversation
return TokenMacro.expandAll(build, TaskListener.NULL, template); | ||
} | ||
} catch (MacroEvaluationException e) { | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
printStackTrace directs output to the console and should be replaced with logger debugging
Fixed as you suggested. |
When you can merge this? |
@dawidmalina Im currently on vacation. I want to try out the changes. |
I have tested the changes, nice work. Saw one issue. If I set a taskname to a macro that cant be expanded then the taskname will be an empty string, I think it is better to set some name in that case like the project name. |
<img src="${resURL}/plugin/delivery-pipeline-plugin/help/description.png"/> | ||
<p> | ||
In a build Delivery Pipeline View this description will be shown as an description for the task. Description can be customized with all environment and <a href="http://ci.jenkins-ci.org/env-vars.html">build variables</a> using <a href="https://wiki.jenkins-ci.org/display/JENKINS/Token+Macro+Plugin">Token Macro Plugin</a> | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add for example this:
<help xmlns="/lib/token-macro"/>
It will be replaced with a list of all macros available.
Will aply this tommorow 👍 |
Done |
|
||
final String buildDescription = TokenUtils.decodedTemplate(build, resolveBuildDescription(build)); | ||
final String name = TokenUtils.decodedTemplate(build, this.getName()); | ||
final String taskName = (TokenUtils.stringIsNotEmpy(name) ? name : project.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If decoded name will be empty or null we will use project name as fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fallback should be project.getDisplayName().
When this change will be merged? |
When this can be merged? |
…th parameterized trigger
…ronment variable JENKINS-23249 - implementation of PARSE_VERSION macro
I would be good to start merging. It will save lots of time with merge conflicts:) I see that you are changing Task class in other PR. |
Hi @dawidmalina! I've gone through the whole pull request and I think it looks good. However, I fail to see the actual description when I test the UI locally. Can you please clarify how it should be displayed (and possibly attach a screenshot) so I can troubleshoot (maybe I've just missed something obvious). |
Templates are configured per build and if you click on help button you will see help message and screenshot like: src/main/webapp/help/description.png |
Thanks! I'll see if I can get it working locally. Should be good to merge after that! |
JENKINS-29637 - Ability to provide description for the task
Great job @dawidmalina! Thanks a lot for your contribution, keep it up! |
as documented in Diabol/delivery-pipeline-plugin#138 Change-Id: Ic6d7e54ea55c235deeb80240bb5c10e84bcff30d
Project: openstack-infra/jenkins-job-builder 15e06f95869cb9ae3a7361a88a4ca10155b4d221 delivery-pipeline: support task description template as documented in Diabol/delivery-pipeline-plugin#138 Change-Id: Ic6d7e54ea55c235deeb80240bb5c10e84bcff30d
as documented in Diabol/delivery-pipeline-plugin#138 Change-Id: Ic6d7e54ea55c235deeb80240bb5c10e84bcff30d
Additionally:
This change will handle this: JENKINS-20608 - Cannot use Env Var in Task Name