Support force-building metadata layers into snapshot (#1731)

* feat: add support for forcing build metadata

* Chore: Added snapshot forceBuildMetadata flag tests.
This commit is contained in:
Rhianna
2021-10-18 11:43:51 -07:00
committed by GitHub
parent 7e3954ac73
commit b525d1e27b
5 changed files with 56 additions and 10 deletions
+1
View File
@@ -216,6 +216,7 @@ func addKanikoOptionsFlags() {
RootCmd.PersistentFlags().Var(&opts.Git, "git", "Branch to clone if build context is a git repository")
RootCmd.PersistentFlags().BoolVarP(&opts.CacheCopyLayers, "cache-copy-layers", "", false, "Caches copy layers")
RootCmd.PersistentFlags().VarP(&opts.IgnorePaths, "ignore-path", "", "Ignore these paths when taking a snapshot. Set it repeatedly for multiple paths.")
RootCmd.PersistentFlags().BoolVarP(&opts.ForceBuildMetadata, "force-build-metadata", "", false, "Force add metadata layers to build image")
}
// addHiddenFlags marks certain flags as hidden from the executor help text