Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Commit 0ab552a

Browse files
committed
fix web editor conflicts resolutions
1 parent 47ab3fe commit 0ab552a

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

integration/integration_test.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func getGitRepo() string {
216216
}
217217
return "github.com/GoogleContainerTools/kaniko"
218218
}
219-
219+
220220
func TestGitBuildcontext(t *testing.T) {
221221
repo := getGitRepo()
222222
dockerfile := "integration/dockerfiles/Dockerfile_test_run_2"
@@ -262,10 +262,11 @@ func TestGitBuildcontext(t *testing.T) {
262262
}
263263

264264
func TestBuildViaRegistryMirror(t *testing.T) {
265-
repo := "github.com/GoogleContainerTools/kaniko"
265+
repo := getGitRepo()
266+
dockerfile := "integration/dockerfiles/Dockerfile_registry_mirror"
266267

267268
// Build with docker
268-
dockerImage := GetDockerImage(config.imageRepo, "Dockerfile_test_git")
269+
dockerImage := GetDockerImage(config.imageRepo, "Dockerfile_registry_mirror")
269270
dockerfile := dockerfileTestRun
270271
dockerCmd := exec.Command("docker",
271272
append([]string{"build",
@@ -278,17 +279,15 @@ func TestBuildViaRegistryMirror(t *testing.T) {
278279
}
279280

280281
// Build with kaniko
281-
kanikoImage := GetKanikoImage(config.imageRepo, "Dockerfile_test_git")
282-
dockerfile = "integration/dockerfiles/Dockerfile_registry_mirror"
283-
kanikoCmd := exec.Command("docker",
284-
append([]string{"run",
285-
"-v", os.Getenv("HOME") + "/.config/gcloud:/root/.config/gcloud",
286-
ExecutorImage,
287-
"-f", dockerfile,
288-
"-d", kanikoImage,
289-
"--registry-mirror", "gcr.io",
290-
contextFlag, contextPath
291-
"-b", config.gcsBucket)...)
282+
kanikoImage := GetKanikoImage(config.imageRepo, "Dockerfile_registry_mirror")
283+
dockerRunFlags := []string{"run", "--net=host"}
284+
dockerRunFlags = addServiceAccountFlags(dockerRunFlags, config.serviceAccount)
285+
dockerRunFlags = append(dockerRunFlags, ExecutorImage,
286+
"-f", dockerfile,
287+
"-d", kanikoImage,
288+
"-c", fmt.Sprintf("git://%s", repo))
289+
290+
kanikoCmd := exec.Command("docker", dockerRunFlags...)
292291

293292
out, err = RunCommandWithoutTest(kanikoCmd)
294293
if err != nil {

pkg/config/options.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ type KanikoOptions struct {
4040
ImageNameDigestFile string
4141
OCILayoutPath string
4242
RegistryMirror string
43-
InsecureRegistries multiArg
43+
InsecureRegistries multiArg
4444
SkipTLSVerifyRegistries multiArg
4545
Destinations multiArg
4646
BuildArgs multiArg
47-
InsecureRegistries multiArg
48-
SkipTLSVerifyRegistries multiArg
4947
Insecure bool
5048
SkipTLSVerify bool
5149
InsecurePull bool

0 commit comments

Comments
 (0)