hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.13k stars 3.33k forks source link

Disable progress bar #10027

Open DrStrangepork opened 4 years ago

DrStrangepork commented 4 years ago

Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

We use Jenkins to do packer builds in AWS, and the progress bars for copying files take an exorbitant amount of space in the logs. We would like to disable the progress bars for file copies entirely.

Use Case(s)

Give this template:

"provisioners": [
  {
    "type": "file",
    "source": "provisioners/files/SetEnvironmentVariables.ps1",
    "destination": "C:/LM-Build/"
  }
}

We get this output:

2020-10-01T18:28:45Z: ==> LIGEPCSA-6684: Uploading provisioners/files/SetEnvironmentVariables.ps1 => C:/Build/

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00%

SetEnvironmentVariables.ps1 1.89 KiB / 1.89 KiB  100.00% 6s

Potential configuration

packer build --no-progress-bar TEMPLATE

Potential References

SwampDragons commented 4 years ago

This is automatic as of v1.6.1 if you set the --machine-readable flag, or as of v 1.6.3 if you run Packer as a background process.

That said, adding an actual flag should be feasible as well.