Make cache repo relative to registry for ecr/gcr (#19)
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Shubham Agrawal 2021-04-21 12:55:13 +05:30 committed by GitHub
parent 4612825d41
commit 71f15eb3f4
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

@ -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{
@ -133,7 +133,7 @@ func run(c *cli.Context) error {
Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"),
CacheRepo: c.String("cache-repo"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")),
CacheTTL: c.Int("cache-ttl"),
},
}

@ -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{
@ -133,7 +133,7 @@ func run(c *cli.Context) error {
Labels: c.StringSlice("custom-labels"),
SnapshotMode: c.String("snapshot-mode"),
EnableCache: c.Bool("enable-cache"),
CacheRepo: c.String("cache-repo"),
CacheRepo: fmt.Sprintf("%s/%s", c.String("registry"), c.String("cache-repo")),
CacheTTL: c.Int("cache-ttl"),
},
}