-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add copy-to-clipboard button to the build console output #8960
Conversation
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
Thanks for the pull request @anhcraft . When you performed the testing, did you confirm that the copied text was inserted into the clipboard? When I've tested these types of pull requests in the past, I needed to use an HTTPS URL to check that the correct text was placed on the clipboard. |
It should be a secure context, which is localhost or https url |
It worked for me when running locally. My PR does not change the secure-context check at all. |
Would it be possible to put the copy button in the top right corner of the logs like it's done on GitHub amongst others? Having it alongside titles gives the false impression that's their content which will be copied, it's not obvious at first look these buttons concern the logs block below.
|
I think that is a reasonable request for another pull request, since the placement that @anhcraft has selected is consistent with the placement of other copy buttons in Jenkins. |
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.
Thanks!
Co-authored-by: Alexander Brandes <[email protected]>
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.
/label ready-for-merge
This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.
Thanks!
Congratulations on getting your very first Jenkins core pull request merged 🎉🥳 |
Sorry for commenting on this long ago resolved ticket:
(Note: I am using Jenkins v2.452.3 and look in classic UI at the "Console Output" view of a recently ran pipeline)
So actually: when and where should I see this "Copy" button? |
not sure, maybe a plugin is out of date? |
Well, no, not really: Only Blue Ocean 1.27.14 was just released and I have "just" 1.27.13 installed. Is the view from my screenshot above the right one? That is, should it be there? (Or am I on the wrong track or view?) |
Should be, I'm not sure why its not there for you |
Oh, maybe this comment explains it: #9169 (comment) Because I was "only" looking at the "Console output" of a scripted pipeline job so far... |
Which was ported to pipeline in jenkinsci/workflow-job-plugin#439 I tested with a pipeline |
Well, no, not really: Only Blue Ocean 1.27.14 was just released and I have "just" 1.27.13 installed. And besides that now "Configuration as Code" (1810 => 1836) and GitHub Branch Source (1789 => 1790) and Pipeline API (1316 => 1322). Oh, the version of aforementioned "workflow-job" plugin installed is only 1400.v7fd111b_ec82f (released already ~6 months ago) -- and for my version of Jenkins core (2.425.3) there is (according to the Jenkins plugin manager Web UI) no update available of this plugin. Although there are/were newer releases of this plugin, like e.g. 1436.vfa_244484591f (2 weeks ago) with the aforementioned fix for pipeline (jenkinsci/workflow-job-plugin#439). That explains the missing feature. Thanks! However, I am wondering why I don't get this update. When I specify this latest version of the plugin in the corresponding Job DSL tests I actually get this (matching) error message:
And in https://github.com/jenkinsci/workflow-job-plugin/blob/master/pom.xml I see something that may be related?
So that explains everything? |
Yup exactly so it'll be available in the next LTS version which will be released on 7th August |
text
. Therefore, this PR also introduces another parameterref
to refer to the target element using the id. Compared to thetext
approach, it has some advantages: reduces page size, supports formatted logging output and can work across UI components.Testing done
Manually testing
Before:
After:
Proposed changelog entries
Submitter checklist
Tasks
Desired reviewers
@jenkinsci/core-pr-reviewers
Before the changes are marked as
ready-for-merge
:Maintainer checklist
Tasks