Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[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"
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
Could you attach screenshots of what this makes Blue Ocean look like? Thanks. |
This comment has been minimized.
This comment has been minimized.
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. |
...a/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.
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
Yeah it seems like something flaky on the CI instance to me. I'll close this PR and reopen it to restart the build. |
This comment has been minimized.
This comment has been minimized.
jennbriden
commented
Jan 7, 2019
LGTM (the UX PM) |
This comment has been minimized.
This comment has been minimized.
Thanks for the improvement @soenkekueper! |
This comment has been minimized.
This comment has been minimized.
Would it not be better for the |
This comment has been minimized.
This comment has been minimized.
bitwiseman
commented
Jan 23, 2019
•
@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 |
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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. |
soenkekueper commentedJan 4, 2019
•
edited by dwnusbaum
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.