Closed mojtaba-esk closed 1 month ago
The changes introduce support for build arguments when building Docker images using Kaniko. A new test function is added to validate this functionality, and several modifications are made across various files to implement a structured approach for handling build arguments. This includes updates to methods for setting images and Git repositories, as well as the introduction of new types and interfaces for managing these arguments.
File Path | Change Summary |
---|---|
e2e/system/build_image_test.go | Added TestBuildWithBuildArgs to test building Docker images with build arguments. |
pkg/builder/args.go | Introduced BuildArg and CustomArg types implementing ArgInterface for structured arguments. |
pkg/builder/builder.go | Changed Args field type in BuilderOptions from []string to []ArgInterface . |
pkg/builder/kaniko/kaniko.go | Restructured prepareJob method and added prepareArgs function for argument handling. |
pkg/builder/kaniko/kaniko_test.go | Updated tests to use ArgInterface for passing build arguments. |
pkg/container/docker.go | Modified NewBuilderFactory to accept args []builder.ArgInterface for build argument passing. |
pkg/instance/build.go | Enhanced SetImage and SetGitRepo methods to accept builder.ArgInterface as additional args. |
Objective | Addressed | Explanation |
---|---|---|
Add support for build arguments when building Docker images using Kaniko (567) | ✅ |
SetImage
method in pkg/instance/build.go
to accept additional arguments of type builder.ArgInterface
, related to handling build arguments.knuu
In the garden where we play,
New arguments come out to sway.
With Kaniko's build, so bright and bold,
Docker images, a sight to behold!
Hop along, let’s build with cheer,
For every change brings joy near! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closes #567
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor