Packaging improvements

- compress images with xz by default (and decompress on install)
- add help menu and command line argument parsing to package.sh
- display packaging status if `pv` command available
This commit is contained in:
2024-03-11 16:29:59 -07:00
parent a424394109
commit 50cb23a4c7
3 changed files with 95 additions and 42 deletions
+1 -14
View File
@@ -7,20 +7,7 @@ Packaging and installation tools for Streamline's "Streamline EMR" application.
2. run `package.sh` to generate a new application package
3. package will be stored to `build-packages/`
### Alternative Builds
Some variables can be overridden to support alternative builds. For example, an option exists to package the application WITHOUT docker images. This can be done by setting the appropriate environment variables (e.g. `VAR=VALUE ./package.sh`).
Options that can be overridden are:
- `PACKAGE_NAME`: base name of the output package. (default: `streamline-emr`)
- `OUTPUT_DIR`: directory where packages will be stored. (default: `$PROJECT_ROOT/build-packages`)
- `PACKAGE_IMAGES`: if set to a value other than 1, do NOT package images. (default: `1`)
- `IMAGE_TAG`: if set, used to specify a source image tag. (default: uses git-based version name)
- `IMAGES_LIST`: if set, specifies an alternate image list file. (default: `$PROJECT_ROOT/images.csv`)
For example, to build using the absolute latest images available:
```bash
IMAGE_TAG=latest package.sh
```
Several defaults can be overridden with command line options or by setting appropriate environment variables. A help prompt can be accessed using `package.sh -h`. For example, `package.sh -t latest -p linux/arm64` will build only the `linux/arm64` platform and use the `latest` tag instead of the current repo version.
## Installing
1. extract the generated archive file in a temporary folder on the target system