* chore: go get -u ./...
* chore: go mod tidy
* chore: go mod vendor
* chore: fix compilation for buildkit >= 0.15.0
* chore: upgrade to Go 1.24
* chore: upgrade the Debian container used in an integration test
* when using wildcard hitting ResolveEnvAndWildcards ignore error when there is no file match
* adding unit test
* fix unit test wrong check in expected
* fix unit test for make sure there is no file copied
* copy with wildcard warning and success when no match file
* fix Test_IsSrcsValid since its changes the behaviour
* For each registry mapping, represent it by a new instance of Repository and
create a new Reference containing it.
* Improve registry mapping parser
* Add more unit tests to cover more use cases
* Fix#3032: Remove query parameters in ADD command when the destination is a directory
* fixing linter URL sorry forget to lint
* add error in extractFilename and realize that ResolveEnvironmentReplacement better execute before getting the filename
* add /path possible in registry maps and/or mirror
* Fixing Unit test Test_ExtractPathFromRegistryURL
* fix typo library
* fix unit test on ExtractPathFromRegistryURL
* fixing go lint url
* fix typo s/ectract/extract
If git clone context is a private self-signed repository, we allow user
to add --git insecure-skip-tls=true flag in the option. The value is
default to false, this behavior is in accordance with the go-git
package.
* Add flag to remap registries for any registry mirror
The purpose of this PR is to add an option to remap registries, a kind of generalized `--registry-mirror`.
This is helpful for air-gapped environments and/or when local registry mirrors are available (not limited to docker.io).
This allows user to reference any images without having to change their location.
It also permit to separate infra related configuration (the mirrors) from CI/CD pipeline definition by using an environment variable for example (the reason behind the early return if flag provided but empty).
Therefore you can have a pipeline calling kaniko with `--registry-map=$REGISTRY_MAP` and have the `REGISTRY_MAP` populated via the runner's env by another team, and the absence of env wouldn't trigger a failure, it makes the pipeline env independent.
I've also considered the option of environment variables directly but it doesn't seems to be in kaniko's philosophy.
This makes quite some duplicated code :/ One option to keep the mirror flag and behavior would be to use only one codebase and convert `--registry-mirror=VALUE` to `--registry-map=index.docker.io=VALUE` internally. Suggestions welcome!
* Configure logging config sooner to be able to use it in flag parsing
* Replace registry mirrors by maps logic and use env var
* Add env vars to README.md
* Fix test
* Prevent extra snapshot when using new run
* Add unit tests for initializing snapshotter
There should be no snapshot for RunV2. Added a test for SingleSnapshot
as well to prove that the test actually works (rather than `initialized`
just not being read or set properly).
* Add an integration test to reproduce #2892
* Fix go compilation
* Fix docker run cmd
* Fixing entrypoint
* Test warmer with cache in a volume.
* Add missing comma
* Fix imports
* Fix dir
* Add logs
* fix
* Use test framework to log
* Fix warmer failing if image already in cache.
* Fix format.