feat(experimental): Build multiple recipes in parallel (#182)
The `build` subcommand can now take in any number of recipe files and will build them all in parallel. Along with this new ability, I've added a way to easily distinguish which part of the build log belongs to which recipe. Check out the `docker_build` action of this PR for an example.  ## Tasks - [x] Make build log follow same pattern as normal logs to keep things consistent - [x] Update color ranges based on @xynydev 's feedback - [x] Deal with ANSI control characters in log output - [x] Add [`indicatif`](https://crates.io/crates/indicatif) to make logs look nicer - [x] Add ability to print logs to a file
This commit is contained in:
parent
18e48a34a4
commit
4ca98c1c2a
24 changed files with 1449 additions and 500 deletions
|
|
@ -8,8 +8,8 @@ print_version_json() {
|
|||
main() {
|
||||
if [[ "$1" == "version" && "$2" == "--json" ]]; then
|
||||
print_version_json
|
||||
elif [[ "$1" == "build" && "$6" == *"cli_test.tar.gz" ]]; then
|
||||
tarpath=$(echo "$6" | awk -F ':' '{print $2}')
|
||||
elif [[ "$1" == "build" && "$7" == *"cli_test.tar.gz" ]]; then
|
||||
tarpath=$(echo "$7" | awk -F ':' '{print $2}')
|
||||
echo "Exporting image to a tarball (JK JUST A MOCK!)"
|
||||
echo "${tarpath}"
|
||||
touch $tarpath
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ print_version_json() {
|
|||
main() {
|
||||
if [[ "$1" == "version" && "$2" == "-f" && "$3" == "json" ]]; then
|
||||
print_version_json
|
||||
elif [[ "$1" == "build" && "$6" == *"cli_test.tar.gz" ]]; then
|
||||
tarpath=$(echo "$6" | awk -F ':' '{print $2}')
|
||||
elif [[ "$1" == "build" && "$7" == *"cli_test.tar.gz" ]]; then
|
||||
tarpath=$(echo "$7" | awk -F ':' '{print $2}')
|
||||
echo "Exporting image to a tarball (JK JUST A MOCK!)"
|
||||
echo "${tarpath}"
|
||||
touch $tarpath
|
||||
|
|
|
|||
38
integration-tests/test-repo/recipes/recipe-39.yml
Normal file
38
integration-tests/test-repo/recipes/recipe-39.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: cli/test
|
||||
description: This is my personal OS image.
|
||||
base-image: ghcr.io/ublue-os/silverblue-main
|
||||
alt-tags:
|
||||
- gts
|
||||
- stable
|
||||
image-version: 39
|
||||
modules:
|
||||
- from-file: akmods.yml
|
||||
- from-file: flatpaks.yml
|
||||
|
||||
- type: files
|
||||
files:
|
||||
- usr: /usr
|
||||
|
||||
- type: script
|
||||
scripts:
|
||||
- example.sh
|
||||
|
||||
- type: rpm-ostree
|
||||
repos:
|
||||
- https://copr.fedorainfracloud.org/coprs/atim/starship/repo/fedora-%OS_VERSION%/atim-starship-fedora-%OS_VERSION%.repo
|
||||
install:
|
||||
- micro
|
||||
- starship
|
||||
remove:
|
||||
- firefox
|
||||
- firefox-langpacks
|
||||
|
||||
- type: signing
|
||||
|
||||
- type: test-module
|
||||
|
||||
- type: containerfile
|
||||
containerfiles:
|
||||
- labels
|
||||
snippets:
|
||||
- RUN echo "This is a snippet" && ostree container commit
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
name: cli/test
|
||||
alt-tags:
|
||||
- gts
|
||||
- stable
|
||||
description: This is my personal OS image.
|
||||
base-image: ghcr.io/ublue-os/silverblue-main
|
||||
image-version: 40
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue