Skip to content
Permalink
Browse files
feat(images-imports): respect dependencies during build
  • Loading branch information
ilya-lesikov committed Jan 28, 2022
1 parent 3eb94e4 commit 4adb6a39923ec778dfc74aec3abce9017e93eab5
Showing with 12 additions and 0 deletions.
  1. +4 −0 pkg/config/stapel_image_base.go
  2. +1 −0 pkg/config/stapel_image_interface.go
  3. +7 −0 pkg/config/werf.go
@@ -37,6 +37,10 @@ func (c *StapelImageBase) imports() []*Import {
return c.Import
}

func (c *StapelImageBase) dependencies() []*Dependency {
return c.Dependencies
}

func (c *StapelImageBase) ImageBaseConfig() *StapelImageBase {
return c
}
@@ -7,4 +7,5 @@ type StapelImageInterface interface {
IsArtifact() bool

imports() []*Import
dependencies() []*Dependency
}
@@ -387,7 +387,14 @@ func (c *WerfConfig) imageDependencies(interf ImageInterface) (deps []ImageInter
deps = append(deps, c.GetArtifact(imp.ArtifactName))
}
}

for _, dep := range i.dependencies() {
deps = append(deps, c.GetImage(dep.ImageName))
}
case *ImageFromDockerfile:
for _, dep := range i.Dependencies {
deps = append(deps, c.GetImage(dep.ImageName))
}
}

return deps

0 comments on commit 4adb6a3

Please sign in to comment.