Skip to content

Commit

Permalink
[release-1.16] Register eventshub image for JobSink (#8391)
Browse files Browse the repository at this point in the history
Register eventshub image for JobSink

The package must be registered so that ImageProducer can map it to the
right image and replace it in the final yaml.

Co-authored-by: Martin Gencur <[email protected]>
  • Loading branch information
knative-prow-robot and mgencur authored Dec 19, 2024
1 parent 852ae3b commit ee786ee
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 ee786ee

Please sign in to comment.