adding reproducible flag (#205)

* adding reproducible test

* newer version of go-containerregistry

* new ImageOptions

* switch reproducible flag to default to false

* small fixes

* update dep
This commit is contained in:
Sharif Elgamal
2018-06-22 12:00:44 -07:00
committed by GitHub
parent 4198901540
commit a7c82cf6f6
11 changed files with 296 additions and 48 deletions
+3
View File
@@ -41,6 +41,7 @@ var (
buildArgs multiArg
tarPath string
singleSnapshot bool
reproducible bool
)
func init() {
@@ -56,6 +57,7 @@ func init() {
RootCmd.PersistentFlags().BoolVarP(&force, "force", "", false, "Force building outside of a container")
RootCmd.PersistentFlags().StringVarP(&tarPath, "tarPath", "", "", "Path to save the image in as a tarball instead of pushing")
RootCmd.PersistentFlags().BoolVarP(&singleSnapshot, "single-snapshot", "", false, "Set this flag to take a single snapshot at the end of the build.")
RootCmd.PersistentFlags().BoolVarP(&reproducible, "reproducible", "", false, "Strip timestamps out of the image to make it reproducible")
}
var RootCmd = &cobra.Command{
@@ -87,6 +89,7 @@ var RootCmd = &cobra.Command{
SnapshotMode: snapshotMode,
Args: buildArgs,
SingleSnapshot: singleSnapshot,
Reproducible: reproducible,
})
if err != nil {
logrus.Error(err)