-
Notifications
You must be signed in to change notification settings - Fork 58
Description
/kind enhancement
What would you like to be added:
Now that the prow image-builder app is completed and is building ci-infra apps productively and gardener apps in a test environment, we could think about the next steps to build gardener/gardener images in prow.
We could proceed in two steps:
- Use prow for test builds replacing
concourse-ci/publishjob - Include prow image build into release pipeline
Step 1: test builds
When investigating the I noticed that the images built by concourse-ci/publish PR test are pushed to eu.gcr.io/gardener-project/gardener which is the same location where we are pushing our release images too.
This does not look ideal from my point of view, because
- we cannot guarantee that those image come from a trusted origin
- I question, that we really need to push those images anywhere. From my perspective these are primary tests if the PR could be built at all.
I would like to propose a slightly different setup for prow
- deactivate
concourse-ci/publishPR test - create a new presubmit job for gardener/gardener which runs a plain kaniko pod without any target but with the --no-push flag
- the pod will build the entire Dockerfile
- it neither uses cache nor pushes the resulting images anywhere, so it can run in safely the prow-work cluster without any credentials for gcr.io
- the goal of this job is to find out, if we are able to build the PR
- Change the destination of
post-gardener-build-imagesjob toeu.gcr.io/gardener-project/gardener- we will build the current state of master branch
- exclude commits which are changing the
VERSIONfile only, that we do not build release images
Those are the gains from my point of view:
- we do not push images from "untrusted" origins to
eu.gcr.io/gardener-project/gardeneranymore - we are able to validate if the prow images are working more easily
- we already reduce the load of our concourse systems
Step 2: release builds
After we verified that our builds are working as expected we can start building our release images in prow.
- create a build prow job similar to
post-gardener-build-imagesfor the release branches which is triggered by changes toVERSIONSfile - deactivate build in concourse pipeline but keep the rest
gardener-robot-ci-*would initiate the release build by pushing a newVERSIONfile to the release branches
Step 2 is still a draft. I cannot see the entire concourse release pipeline yet.
Why is this needed:
Reduce load on concourse pipelines.
Improve development experience.
Build images of a trusted origin only.