Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat(images-imports): respect dependencies during build
  • Loading branch information
ilya-lesikov committed Jan 28, 2022
1 parent 3eb94e4 commit 4adb6a3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/config/stapel_image_base.go
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions pkg/config/stapel_image_interface.go
Expand Up @@ -7,4 +7,5 @@ type StapelImageInterface interface {
IsArtifact() bool

imports() []*Import
dependencies() []*Dependency
}
7 changes: 7 additions & 0 deletions pkg/config/werf.go
Expand Up @@ -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
Expand Down

0 comments on commit 4adb6a3

Please sign in to comment.