Skip to content

Latest commit

 

History

History
88 lines (68 loc) · 4.04 KB

File metadata and controls

88 lines (68 loc) · 4.04 KB

azldev component render

Render post-overlay specs and sidecar files to a checked-in directory

Synopsis

Render the final spec and sidecar files for components after applying all configured overlays. The output is written to a directory as generated artifacts intended for check-in.

The output directory is set via rendered-specs-dir in the project config, or via --output-dir on the command line. If neither is set, an error is returned. Within the output directory, components are organized into letter-prefixed subdirectories based on the first character of their name (e.g., specs/c/curl, specs/v/vim).

Unlike prepare-sources, render skips downloading source tarballs from the lookaside cache — only spec files, patches, scripts, and other git-tracked sidecar files are included. Multiple components can be rendered at once.

When rendering all components (-a), the --clean-stale flag prunes orphan rendered-spec directories (per-component dirs that no longer correspond to any component in the project config). Per-component dirs that ARE in config are overwritten in place by the render itself; this means each render's result table accurately reflects which components actually changed on disk. Top-level non-component siblings (e.g. a hand-placed README.md) are preserved. When using a custom output directory (--output-dir), --force is required alongside --clean-stale as a safety measure. This flag is only valid with -a.

azldev component render [flags]

Examples

  # Render all components (output dir from config)
  azldev component render -a

  # Render a single component
  azldev component render -p curl

  # Render to a custom directory, allowing removal of existing rendered component directories
  azldev component render -a -o rendered/ --force

  # Render all and remove stale directories
  azldev component render -a --clean-stale

Options

  -a, --all-components                Include all components
      --check-only                    render to a staging area and compare against the existing on-disk output without modifying the output directory. Exits 0 when nothing would change and 1 when any component would drift. With -a + --clean-stale, also fails on orphan rendered-spec directories. Intended for CI gates.
      --clean-stale                   prune rendered-spec directories that no longer correspond to a configured component (only with -a; requires -f with -o). Top-level non-component siblings are preserved.
  -p, --component stringArray         Component name pattern
  -g, --component-group stringArray   Component group name
      --fail-on-error                 exit with error if any component fails to render (useful for CI)
  -f, --force                         allow overwriting existing rendered component directories
  -h, --help                          help for render
  -o, --output-dir string             output directory for rendered specs (overrides rendered-specs-dir from config)
      --skip-lock-validation          skip lock file consistency checks
  -s, --spec-path stringArray         Spec path

Options inherited from parent commands

  -y, --accept-all                accept all prompts
      --color mode                output colorization mode {always, auto, never} (default auto)
      --config-file stringArray   additional TOML config file(s) to merge (may be repeated)
  -n, --dry-run                   dry run only (do not take action)
      --network-retries int       maximum number of attempts for network operations (minimum 1) (default 3)
      --no-default-config         disable default configuration
  -O, --output-format fmt         output format {csv, json, markdown, table} (default table)
      --permissive-config         do not fail on unknown fields in TOML config files
  -C, --project string            path to Azure Linux project
  -q, --quiet                     only enable minimal output
  -v, --verbose                   enable verbose output

SEE ALSO