Skip to content

rebornplusplus/chisel-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chisel-tools

This repository contains a bunch of tools, one can use with Chisel for various purposes such as CI/CD.

sdf tool

The sdf tool supports a few subcommands which can check/verify/install slice definition files.

Installation

Using go install:

go install github.com/rebornplusplus/chisel-tools/cmd/sdf@latest

Or, build:

go build ./cmd/sdf/

Subcommands

sdf install

The sdf install sub-command installs all slices from a specified list of files. This is particularly helpful in CI/CD when checking if the added slice definition files are good and installable.

  • -r, --release is used to pass the chisel-releases directory path.

  • -a, --arch is used to set the package architecture. If unset, it defaults to amd64.

  • The sdf install command supports installing the slices in parallel. The -w, --workers option is used to set the number of concurrent installations. If left unset, the default is 10. If the number of slices is less than the number of workers, the number of workers is reduced to the number of slices.

  • Instead of installing the slices one by one, one can leverage the --combine option to install all slices together in one go.

  • The --prune option, if set, does something clever. It does not install all of the slices in those files. Instead, it only installs those top-level slices that do not appear as a dependency of any other slices. This ensures minimal installation while a complete error coverage of installing the slices.

  • To get the whole list of errors, -c, --continue-on-error may be used.

  • A package may be unavailable for a certain architecture. To ignore those errors of "package not found", one should set --ignore-missing.

  • In a similar note, the --ensure-existence option, if set, verifies that each package in the slice definition files exists for some architecture.

Example usage

The following installs all of the slices in the slices/ directory for arm64 architecture with upto 20 workers, ignoring the missing packages for arm64 while also asserting that each package exists for some architecture. It also only installs the top-level slices.

sdf install --release ./chisel-releases/ --arch arm64 \
  --prune \
  --workers 20 \
  --ignore-missing \
  --ensure-existence \
  slices/*.yaml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages