fluxcd-flux2/cmd
rohansood10 46ad3b2e7a Add --resolve-symlinks flag to build and push artifact commands
When building OCI artifacts from directories containing symlinks (e.g.,
symlink trees created by Nix), the symlinked files are silently skipped
because the underlying archive logic only handles regular files and
directories. This results in empty or incomplete artifacts.

This change adds a --resolve-symlinks flag to both 'flux build artifact'
and 'flux push artifact' commands. When set, symlinks are resolved by
copying their target contents into a temporary directory before building
the artifact. This approach:

- Preserves backward compatibility (default behavior unchanged)
- Works with symlinks pointing outside the source directory
- Handles symlinked files and directories
- Cleans up the temporary directory after the build completes

Fixes fluxcd/flux2#5055

Signed-off-by: rohansood10 <rohansood10@users.noreply.github.com>
2026-02-19 09:28:54 -08:00
..
flux Add --resolve-symlinks flag to build and push artifact commands 2026-02-19 09:28:54 -08:00