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 support for custom output folder in FileZipOperation #12

Merged
merged 2 commits into from May 15, 2020

Conversation

KevinHagen
Copy link
Contributor

We wanted to use this plugin for zipping our build files before uploading them to our server. Doing so, we've realized that you can not specify an output directory and instead the zip operation always just throws the zip file into the root workspace directory.

It would be great if you could specify the output directory instead.

@KevinHagen
Copy link
Contributor Author

Hey @pskumar448, any news on if this pr can be merged?
We would really like to have this feature in our pipeline!

@pskumar448 pskumar448 merged commit a8c5a0c into jenkinsci:master May 15, 2020
@mwinfie
Copy link

mwinfie commented Jun 3, 2020

It looks like this has broken some of our builds using fileZipOperation. Was it intentional to introduce the output directory parameter without setting a default value if the user does not set it? That is a breaking change.

@wreggyl
Copy link

wreggyl commented Jun 9, 2020

this change changed the interface not in a backwards compatible way
worked in 1.9 but not in 1.10

FileZipOperation(myPath)
maybe it is better to to have a fallback if no outputFolderPath is specified that it chooses the current directory as fallback like it was the default in all previous releases?

if only one parameter is given without name, treat it as folderPath and choose outPutFolderPath as current directory: FileZipOperation(myPath) => FileZipOperation(folderPath: myPath, outputFolderPath: ".")
FileZipOperation(folderPath: myPath) => FileZipOperation(folderPath: myPath, outputFolderPath: ".")
FileZipOperation(folderPath: myPath, outputFolderPath: myOutPutPath) => FileZipOperation(folderPath: myPath, outputFolderPath: myOutPutPath)

@relyafi
Copy link
Contributor

relyafi commented Jun 13, 2020

@wreggyl I agree with your comments - it looks like in earlier versions it used to output files to the workspace directory. I've raised a PR to restore this behaviour by default, as well as tackle other bugs that seem to have been introduced by this change.

#14

@KevinHagen
Copy link
Contributor Author

Thanks for clearing this out. I was in a hurry fixing this for our use-case and since it worked I filed the PR. With @relyafi s changes we should be fine again :)

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.

None yet

5 participants