-
Notifications
You must be signed in to change notification settings - Fork 164
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
Feature: Added the ability to suppress verbose logging during unzip step #40
Conversation
… logs on extraction and simply prints a number of files dealt with instead.
Fixed missing } from resolving conflict
@@ -175,8 +184,18 @@ public UnZipFileCallable(TaskListener listener, FilePath destination, String glo | |||
} | |||
} | |||
if (read) { | |||
if (quiet) { | |||
logger.print("Read: "); |
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.
This would be good to have be printed even if quiet
is false
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.
That can certainly be done. I'll have a new commit with that momentarily.
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.
With that change the tests I added will always work, even if run with quiet = false, since they were just looking for that. Is there an assertLogNotContains or anything like that I could use to make the test check that "Extracting: hello.txt ->" is not in the log?
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.
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! Tests have been updated with that checking.
Hello Guys ! |
@NikhilDeshmukh045 The standard java zip library that is currently used does not support password encryption. To make the zip/unzip steps support that we would need to use something like Zip4J for example. |
As mentioned in JENKINS-40518, using the unzip step results in every file dealt with being logged, which can make logs large and annoying to read. This PR adds a boolean option 'quiet' to the unzip step, which when true turns off said logging and instead prints a total file count when done. By default quiet is false.