[gce] Use pigz if available to compress fx disk image

fx gce create-fuchsia-image constructs a fuchsia disk image suitable
for GCE; the image is a raw disk image inside a gzipped tarball.
One of the slower steps of constructing the disk image is gzipping
the tarball; use pigz (parallel gzip) if available to save time.

On a Xeon 'Skylake' 24 vCPU GCE instance, reduces the time for
compression in create-fuchsia-image from 2 min to 9 seconds.

Change-Id: Ic880890737f6af585f6e91406655097cd79dbab6
1 file changed
tree: e527ccf9ede3f671d7d829c1159f2d4719cf65ef
  1. crash/
  2. dart/
  3. devshell/
  4. editors/
  5. gce/
  6. gdb/
  7. manifest/
  8. memory/
  9. packages/
  10. rust/
  11. sdk/
  12. style/
  13. tests/
  14. third_party/
  15. vim/
  16. youcompleteme/
  17. zsh-completion/
  18. .gitignore
  19. AUTHORS
  20. bootstrap
  21. build-qemu.sh
  22. build-zircon.sh
  23. build_id_conv.py
  24. check-gn-format
  25. colorize_logs
  26. CONTRIBUTING.md
  27. fd.py
  28. fetch-build-artifacts
  29. flog
  30. fx
  31. fx-env.sh
  32. fx-wrapper
  33. generate-intellij-config.py
  34. git-file-tidy
  35. git-fuchsia-review
  36. git_utils.py
  37. gn_to_cmake.py
  38. LICENSE
  39. list-available-packages.py
  40. MAINTAINERS
  41. PATENTS
  42. paths.py
  43. README.md
  44. run-dart-action.py
  45. run-zircon-arm64
  46. run-zircon-x86
  47. start-dhcp-server.sh
  48. update-manifest.go
README.md

Scripts

This repository is for scripts useful when hacking on Fuchsia. This repository should contain scripts that perform tasks spanning multiple repositories. Scripts that only operate within a single repository should live in the relevant repository.

push-package.py

The push-package.py script pushes the files listed in the given manifests files. No checking is performed for incremental changes.

The sample command lines below can be used to build Modular and then push those files to the default device. This assumes you have already booted your device with a version of Fuchsia that contains the most recent version of all other packages. This command line uses the “system_manifest” file from each of the modular directories, such as modular, modular_dev, and modular_tests.

cd $FUCHSIA_DIR
fx build peridot:modular_all
scripts/push-package.py out/debug-x64/package/modular*/system_manifest

fx publish

fx publish will take a package from the build and create a Fuchsia package manager package from a build package. It will then add the package to a local update respository which, by default, is put at ${FUCHSIA_BUILD_DIR}/amber-files. It will also add the package content files to the update repository and name these file after their Merkle Root. If a package name is supplied to fx publish, only that package will be processed. If no name is supplied, all the packages made by the build will be included.