Skip to content
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 function to write directly to a file #21

Merged
merged 1 commit into from
Jul 13, 2022
Merged

add function to write directly to a file #21

merged 1 commit into from
Jul 13, 2022

Conversation

gdemengin
Copy link
Owner

based on #18 but with 2 separate functions (instead of a new option)

  • void writeLogsWithBranchInfo(hudson.FilePath filePath, java.util.LinkedHashMap options = [:], build = currentBuild)
    writes the logs directly in the filePath object
  • void writeLogsWithBranchInfo(String node, String path, java.util.LinkedHashMap options = [:], build = currentBuild)
    same to create the hudson.FilePath from node and Path

…ce instead of storing in the Heap

improves performance
reduces Heap consumption with big logs

the new functions are:
- void writeLogsWithBranchInfo(hudson.FilePath filePath, java.util.LinkedHashMap options = [:], build = currentBuild)
  filePath: a FilePath object to the log file  -  FilePath to allow writing to file on Jenkins agent workspace
- void writeLogsWithBranchInfo(String node, String path, java.util.LinkedHashMap options = [:], build = currentBuild)
  node: the node name
  path: the absolute path to write to
@gdemengin gdemengin merged commit 88fa0f5 into main Jul 13, 2022
@gdemengin gdemengin deleted the write-to-file branch July 13, 2022 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants