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

Archive Files task should warn user when folder to archive is empty #7465

Closed
jflamb opened this issue Jun 13, 2018 · 3 comments
Closed

Archive Files task should warn user when folder to archive is empty #7465

jflamb opened this issue Jun 13, 2018 · 3 comments
Assignees

Comments

@jflamb
Copy link
Contributor

jflamb commented Jun 13, 2018

Environment

  • All environments

Issue Description

I was following the "Implement a CI/CD process to build and deploy your Node.js app to Azure" tutorial using the NodeJS with Gulp template. That template set the root folder to archive setting on the Archive Files task to $(BinariesDirectory). In the case of a Node.js app, however, this directory is generally empty. As a result, the zip file created is empty.

When I proceed to the next step of the tutorial and set up the release definition, the Azure App Service Deploy task reported the following errors:

  • The Zip package 'D:\a\r1\a\tin-octopus-Node.js With gulp-CI\drop\625.zip' could not be loaded.
  • Package file 'D:\a\r1\a\tin-octopus-Node.js With gulp-CI\drop\625.zip' is not in a supported .zip format and therefore cannot be read.

It turned out that these errors were due to the fact that the zip file was empty. It would have been very helpful if the build process had output a warning to let me know that the zip file it was creating was empty. Also, it would be helpful if there was a setting that would log the files that were archived for verification purposes.

@bryanmacfarlane
Copy link
Contributor

I would probably go the more information route.

@stephenmichaelf - we can print the number of files to be zipped, and print the first level files / folders (up to 10 and if ten ... line below).

That gives the user an understanding of what they're zipping. For both the empty file case and the case where there's an unexpected root folder, it will be clearer to the user the effect of what they configured.

@stephenmichaelf
Copy link
Member

Yup! Will add this.

@stephenmichaelf
Copy link
Member

@jtpetty Can you take a look at this?

jtpetty pushed a commit that referenced this issue Aug 21, 2019
- Number is capped to a small number to prevent spamming the console
- Added initial L0 test suite for ArchiveFiles
jtpetty pushed a commit that referenced this issue Sep 19, 2019
…files

Updated to print out number of archived files #7465
@jtpetty jtpetty closed this as completed Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants