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

Feature: Added the ability to suppress verbose logging during unzip step #40

Merged
merged 7 commits into from
Feb 13, 2018
Merged

Conversation

madbrenner
Copy link
Contributor

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.

Matthew Brenner and others added 5 commits February 9, 2018 19:17
@@ -175,8 +184,18 @@ public UnZipFileCallable(TaskListener listener, FilePath destination, String glo
}
}
if (read) {
if (quiet) {
logger.print("Read: ");
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

@rsandell rsandell merged commit 2620547 into jenkinsci:master Feb 13, 2018
@NikhilDeshmukh045
Copy link

Hello Guys !
It is possible to add password parameter for extracting password protected zip file within Jenkins server using Jenkinsfile.

@rsandell
Copy link
Member

@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.

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.

3 participants