Skip to content

Commit

Permalink
Register eventshub image for JobSink (#990)
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 Jan 24, 2025
1 parent c2f9c0d commit 0f09402
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 0f09402

Please sign in to comment.