Skip to content

Commit

Permalink
Fix Java hermetic builds pipeline and configurations
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi committed Oct 1, 2024
1 parent d744cbc commit 6b60c54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/eventing-kafka-broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ config:
- .*hermetic.*
konflux:
enabled: true
javaImages:
- .*eventing-kafka-broker-receiver
- .*eventing-kafka-broker-dispatcher
openShiftVersions:
- useClusterPool: true
version: "4.16"
Expand Down
5 changes: 3 additions & 2 deletions pkg/konfluxgen/konfluxgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func Generate(cfg Config) error {
break
}
}
dockerfilePath := ""
dockerfilePath := ib.ProjectDirectoryImageBuildInputs.DockerfilePath
for _, r := range javaImages {
if r.MatchString(string(ib.To)) {
pipeline = DockerJavaBuild
Expand All @@ -267,6 +267,7 @@ func Generate(cfg Config) error {
Tags: append(cfg.Tags, "latest"),
BuildArgs: cfg.BuildArgs,
PrefetchDeps: cfg.PrefetchDeps,
DockerfilePath: dockerfilePath,
}

if cfg.IsHermetic(c.ReleaseBuildConfiguration, ib) {
Expand Down Expand Up @@ -380,7 +381,7 @@ func Generate(cfg Config) error {

buf.Reset()

if config.Pipeline == FBCBuild {
if config.Pipeline == DockerJavaBuild {

if err := pipelineDockerJavaBuildTemplate.Execute(buf, nil); err != nil {
return fmt.Errorf("failed to execute template for pipeline %q: %w", containerJavaBuildPipelinePath, err)
Expand Down
1 change: 1 addition & 0 deletions pkg/prowgen/prowgen_konflux.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func GenerateKonflux(ctx context.Context, openshiftRelease Repository, configs [
Excludes: b.Konflux.Excludes,
ExcludesImages: b.Konflux.ExcludesImages,
FBCImages: b.Konflux.FBCImages,
JavaImages: b.Konflux.JavaImages,
ResourcesOutputPath: fmt.Sprintf("%s/.konflux", r.RepositoryDirectory()),
PipelinesOutputPath: fmt.Sprintf("%s/.tekton", r.RepositoryDirectory()),
Nudges: nudges,
Expand Down

0 comments on commit 6b60c54

Please sign in to comment.