mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-22 09:37:48 +02:00
optimize: don't parse Dockerfile twice and just reuse stages
This commit is contained in:
@@ -322,8 +322,12 @@ COPY --from=stage2 /bar /bat
|
||||
opts := &config.KanikoOptions{
|
||||
DockerfilePath: f.Name(),
|
||||
}
|
||||
|
||||
got, err := CalculateDependencies(opts)
|
||||
testStages, err := dockerfile.Stages(opts)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to parse test dockerfile to stages: %s", err)
|
||||
}
|
||||
|
||||
got, err := CalculateDependencies(testStages, opts)
|
||||
if err != nil {
|
||||
t.Errorf("got error: %s,", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user