Skip to content

Commit

Permalink
Support Hermetic java builds (#304)
Browse files Browse the repository at this point in the history
To support hermetic builds for Java, we will follow the POC here:
openshift-knative/eventing-kafka-broker#1273.

While this currently doesn't pass the enterprise contract, I've
validated that it will in the future with Konflux team here:
https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1727247236771179
that it will in the future with the addition of `KONFLUX-298`.

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi authored Sep 30, 2024
1 parent d7fe8cc commit 141a787
Show file tree
Hide file tree
Showing 14 changed files with 690 additions and 64 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ konflux-update-pipelines:
tkn bundle list quay.io/konflux-ci/tekton-catalog/pipeline-docker-build:devel -o=yaml > pkg/konfluxgen/kustomize/docker-build.yaml
tkn bundle list quay.io/konflux-ci/tekton-catalog/pipeline-fbc-builder:devel -o=yaml > pkg/konfluxgen/kustomize/fbc-builder.yaml
kustomize build pkg/konfluxgen/kustomize/kustomize-docker-build/ --output pkg/konfluxgen/docker-build.yaml --load-restrictor LoadRestrictionsNone
kustomize build pkg/konfluxgen/kustomize/kustomize-java-docker-build/ --output pkg/konfluxgen/docker-java-build.yaml --load-restrictor LoadRestrictionsNone
kustomize build pkg/konfluxgen/kustomize/kustomize-fbc-builder/ --output pkg/konfluxgen/fbc-builder.yaml --load-restrictor LoadRestrictionsNone

unit-tests:
Expand Down
4 changes: 4 additions & 0 deletions config/eventing-kafka-broker.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
config:
branches:
release-next:
konflux:
javaImages:
- .*eventing-kafka-broker-receiver
- .*eventing-kafka-broker-dispatcher
openShiftVersions:
- useClusterPool: true
version: "4.16"
Expand Down
12 changes: 9 additions & 3 deletions pkg/discover/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,18 @@ func discover(ctx context.Context, path string) error {
for ; i < len(availableBranches); i++ {
if _, ok := inConfig.Config.Branches[availableBranches[i]]; !ok {
branchConfig := inConfig.Config.Branches[latest]

// enable Konflux for all new branches
branchConfig.Konflux = &prowgen.Konflux{
Enabled: true,
other := branchConfig
if other.Konflux == nil {
other.Konflux = &prowgen.Konflux{
Enabled: true,
}
} else {
other.Konflux.Enabled = true
}

inConfig.Config.Branches[availableBranches[i]] = branchConfig
inConfig.Config.Branches[availableBranches[i]] = other
}
}
}
Expand Down
Loading

0 comments on commit 141a787

Please sign in to comment.