Command 'charmcraft pack'

Usage:

charmcraft pack [options]

Summary:

Build and pack a charm operator package or a bundle.

You can juju deploy the resulting .charm or bundle’s .zip file directly, or upload it to Charmhub with charmcraft upload.

For the charm you must be inside a charm directory with a valid charmcraft.yaml, requirements.txt including the ops package for the Python operator framework, and an operator entrypoint, usually src/charm.py. See charmcraft init to create a template charm directory structure.

For the bundle you must already have a bundle.yaml (can be generated by Juju) and a README.md file.

Options:

-h, --help Show this help message and exit
-v, --verbose Show debug information and be more verbose
-q, --quiet Only show warnings and errors, not progress
--verbosity Set the verbosity level to ‘quiet’, ‘brief’, ‘verbose’, ‘debug’ or ‘trace’
-p, --project-dir Specify the project’s directory (defaults to current)
--format Produce the result in the specified format (currently only ‘json’)
--debug Launch shell in build environment upon failure
--destructive-mode Pack charm using current host which may result in breaking changes to system configuration
--shell Launch shell in build environment in lieu of packing
--shell-after Launch shell in build environment after packing
--bases-index Index of ‘bases’ configuration to build (can be used multiple times); zero-based, defaults to all
--force Force packing even after finding lint errors
--measure Dump measurements to the specified file
--include-all-charms For bundles, pack all charms whose source is inside the bundle directory
--include-charm For bundles, pack the charm in the referenced path. Can be used multiple times
--output-bundle Write the bundle configuration to this path

See also:

  • analyze
  • clean
  • init
  • version

Contributors: @tmihoc, @lengau