-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for build arguments when building Docker images usi…
…ng Kaniko
- Loading branch information
1 parent
f694c3a
commit 599e47c
Showing
7 changed files
with
127 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package builder | ||
|
||
const buildArgKey = "--build-arg" | ||
|
||
type ArgInterface interface { | ||
GetKey() string | ||
GetValue() string | ||
} | ||
|
||
// BuildArg is a build argument that can be passed to the builder. | ||
type BuildArg struct { | ||
Value string | ||
} | ||
|
||
var _ ArgInterface = &BuildArg{} | ||
|
||
func (b *BuildArg) GetKey() string { | ||
return buildArgKey | ||
} | ||
|
||
func (b *BuildArg) GetValue() string { | ||
return b.Value | ||
} | ||
|
||
// CustomArg is a custom argument that can be passed to the builder. | ||
type CustomArg struct { | ||
Key string | ||
Value string | ||
} | ||
|
||
var _ ArgInterface = &CustomArg{} | ||
|
||
func (c *CustomArg) GetKey() string { | ||
return c.Key | ||
} | ||
|
||
func (c *CustomArg) GetValue() string { | ||
return c.Value | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters