Compare commits

..

2 Commits

Author SHA1 Message Date
Shubham Agrawal 3a8625ec32 Use relative name for cache repo 2021-04-21 12:47:22 +05:30
Shubham Agrawal b708f2c84c Allow remote caching of docker layers in kaniko build 2021-04-08 00:03:57 +05:30
3 changed files with 11 additions and 2 deletions
+3
View File
@@ -143,6 +143,9 @@ func run(c *cli.Context) error {
Labels: c.StringSlice("custom-labels"),
SkipTlsVerify: c.Bool("skip-tls-verify"),
SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"),
CacheRepo: c.String("cache-repo"),
CacheTTL: c.Int("cache-ttl"),
},
}
return plugin.Exec()
+4 -1
View File
@@ -101,7 +101,7 @@ func main() {
},
cli.StringFlag{
Name: "cache-repo",
Usage: "Remote repository that will be used to store cached layers. enable-cache needs to be set to use this flag",
Usage: "Remote repository that will be used to store cached layers. Cache repo should be present in specified registry. enable-cache needs to be set to use this flag",
EnvVar: "PLUGIN_CACHE_REPO",
},
cli.IntFlag{
@@ -132,6 +132,9 @@ func run(c *cli.Context) error {
Repo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("repo")),
Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")),
CacheTTL: c.Int("cache-ttl"),
},
}
return plugin.Exec()
+4 -1
View File
@@ -97,7 +97,7 @@ func main() {
},
cli.StringFlag{
Name: "cache-repo",
Usage: "Remote repository that will be used to store cached layers. enable-cache needs to be set to use this flag",
Usage: "Remote repository that will be used to store cached layers. Cache repo should be present in specified registry. enable-cache needs to be set to use this flag",
EnvVar: "PLUGIN_CACHE_REPO",
},
cli.IntFlag{
@@ -132,6 +132,9 @@ func run(c *cli.Context) error {
Repo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("repo")),
Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")),
CacheTTL: c.Int("cache-ttl"),
},
}
return plugin.Exec()