Skip to content

Commit

Permalink
Merge pull request #2583 from tonistiigi/bake-implicit-cacheonly
Browse files Browse the repository at this point in the history
bake: use cacheonly exporter for implicit targets
  • Loading branch information
tonistiigi authored Jul 9, 2024
2 parents 6807690 + 6d6adc1 commit dc83501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bake/bake.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func (c Config) loadLinks(name string, t *Target, m map[string]*Target, o map[st
if err != nil {
return err
}
t2.Outputs = nil
t2.Outputs = []string{"type=cacheonly"}
t2.linked = true
m[target] = t2
}
Expand Down
3 changes: 2 additions & 1 deletion bake/bake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,8 @@ func TestReadContextFromTargetChain(t *testing.T) {

mid, ok := m["mid"]
require.True(t, ok)
require.Equal(t, 0, len(mid.Outputs))
require.Equal(t, 1, len(mid.Outputs))
require.Equal(t, "type=cacheonly", mid.Outputs[0])
require.Equal(t, 1, len(mid.Contexts))

base, ok := m["base"]
Expand Down

0 comments on commit dc83501

Please sign in to comment.