spiegel_podman/pkg/bindings/artifacts
Daniel J Walsh b765c91580
Add --replace option to podman artifact add command
This commit implements the --replace functionality for the artifact add command,
allowing users to replace existing artifacts without having to manually remove
them first.

Changes made:
- Add Replace field to ArtifactAddOptions entity types
- Add --replace CLI flag with validation to prevent conflicts with --append
- Implement replace logic in ABI backend to remove existing artifacts before adding
- Update API handlers and tunnel implementation for podman-remote support
- Add comprehensive documentation and examples to man page
- Add e2e and system BATS tests for --replace functionality
- Fix code formatting in pkg/bindings/artifacts/types_pull_options.go:
  * Reorder imports with proper spacing
  * Fix function declaration spacing
  * Convert spaces to proper tab indentation
  * Remove extraneous blank lines

The --replace option follows the same pattern as other podman replace options
like 'podman container create --replace' and 'podman pod create --replace'.
It gracefully handles cases where no existing artifact exists (no error thrown).

Usage examples:
  podman artifact add --replace quay.io/myimage/artifact:latest /path/to/file
  podman artifact add --replace localhost/test/artifact /tmp/newfile.txt

Fixes: Implements requested --replace functionality for artifact add command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-06 12:22:40 -04:00
..
add.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
extract.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
inspect.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
list.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
pull.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
push.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
remove.go feat: Add artifact remove --all option 2025-08-13 23:00:20 +10:00
types.go Add --replace option to podman artifact add command 2025-10-06 12:22:40 -04:00
types_add_options.go Add --replace option to podman artifact add command 2025-10-06 12:22:40 -04:00
types_extract_options.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
types_inspect_options.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
types_list_options.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
types_pull_options.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
types_push_options.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
types_remove_options.go cmd/podman: --ignore errors flag to artifact rm 2025-10-01 18:22:26 -03:00