Skip to content

Commit

Permalink
Register eventshub image for JobSink (#8390)
Browse files Browse the repository at this point in the history
The package must be registered so that ImageProducer can map it to the
right image and replace it in the final yaml.
  • Loading branch information
mgencur authored Dec 17, 2024
1 parent 2f165f1 commit b00da59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/rekt/resources/jobsink/jobsink.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func Install(name string, opts ...manifest.CfgFn) feature.StepFn {
fn(cfg)
}

if err := registerImage(ctx); err != nil {
t.Fatal(err)
}
if _, err := manifest.InstallYamlFS(ctx, yamlEmbed, cfg); err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -223,3 +226,10 @@ func GoesReadySimple(name string) *feature.Feature {

return f
}

func registerImage(ctx context.Context) error {
im := eventshub.ImageFromContext(ctx)
reg := environment.RegisterPackage(im)
_, err := reg(ctx, environment.FromContext(ctx))
return err
}

0 comments on commit b00da59

Please sign in to comment.