[JENKINS-55410] Added label attribute for documentation and clarity in jenkins views#93
Conversation
…ation for the step to be displayed in the "Pipeline Steps" and Blue Ocean Views. So these views are more domain specific instead of technical. Instead of a lot of "Windows Batch Script" you can see for example "Clean up directory" "Copy files" and "Run build.cmd"
|
Thanks for the PR! After #92 We try to track new features through Jira tickets, so would you be able to open a ticket here with component |
|
Hey, thanks for the fast feedback. Due i'm not so familiar with the development process i've just created the PR. I've now created the ticket https://issues.jenkins-ci.org/browse/JENKINS-55410. Are there some more steps for me to do? |
|
Could you attach screenshots of what this makes Blue Ocean look like? Thanks. |
abayer
left a comment
There was a problem hiding this comment.
Other than the label trimming I mentioned, this seems good - the screenshots look great (thanks, btw!), and with the label trimming, this shouldn't have detrimental side effects.
src/main/java/org/jenkinsci/plugins/workflow/steps/durable_task/DurableTaskStep.java
Outdated
Show resolved
Hide resolved
Using the code snippet generator will display an error message, if the value is longer than 100 characters. If specified in a JenkinsFile the label will be trimmed to (the first) 100 characters.
|
After adding the size limit for the label the jenkins build fails with this error:
Which seems to me like any kind of flakeyness. The newly added testcase labelShortened has passed. |
Yeah it seems like something flaky on the CI instance to me. I'll close this PR and reopen it to restart the build. |
|
LGTM (the UX PM) |
|
Thanks for the improvement @soenkekueper! |
|
Would it not be better for the |
|
@jglick @dwnusbaum It looks like the derived classes each already override Looking at the output images in in the comment above, it seems like label and The |
Sure, this would be a two-minute refactoring. The question is about the user expectation. I would have expected a label to override the actual arguments, so that if I write, say, sh label: 'Collect frobnitzes', script: '''
mvn -B -Dsome.long.option -Dsome.even.longer.option -f whatever/subdir org.whatever:frobnitz-maven-plugin:1.0.3-beta-99:collect
'''that all compliant UIs will display just Collect frobnitzes and not the crazy command line. (Currently, if you omit |
|
As noted in jenkinsci/workflow-basic-steps-plugin#80, what I actually advocated from the start was something more like stage('Collect frobnitzes') { // or even label('…')
sh '''
mvn -B -Dsome.long.option -Dsome.even.longer.option -f whatever/subdir org.whatever:frobnitz-maven-plugin:1.0.3-beta-99:collect
'''
}which would allow a UI to offer whatever level of detail it could comfortably display—permitting drill-down to individual steps where feasible. |
See JENKINS-55410.
I've added an new Attribute "label" to the durable steps, so that this is displayed within the pipeline steps view and blue ocean views instead of the technical Name "Windows Batch Script" or "Linux Shell script". We have got a lot of this and it is very hard to find the right one.
With this labels this step can now display the real domain specific information for example "build manual" "copy driver files" etc. This makes the pipeline views very more comfortable to use.