image: fix registry mirror setup

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
Yoan Blanc
2020-02-16 11:41:51 +01:00
parent edc4eb33f4
commit 474fdcf68d
4 changed files with 12 additions and 7 deletions
+2 -2
View File
@@ -229,7 +229,7 @@ func getGitRepo() string {
} else {
branch = os.Getenv("TRAVIS_BRANCH")
repoSlug = os.Getenv("TRAVIS_REPO_SLUG")
log.Printf("Travis CI pepo: %s branch: %s\n", repoSlug, branch)
log.Printf("Travis CI repo: %s branch: %s\n", repoSlug, branch)
}
return "github.com/" + repoSlug + "#refs/heads/" + branch
}
@@ -303,7 +303,7 @@ func TestBuildViaRegistryMirror(t *testing.T) {
dockerRunFlags = append(dockerRunFlags, ExecutorImage,
"-f", dockerfile,
"-d", kanikoImage,
"--registry-mirror", "gcr.io",
"--registry-mirror", "us-mirror.gcr.io",
"-c", fmt.Sprintf("git://%s", repo))
kanikoCmd := exec.Command("docker", dockerRunFlags...)