openshift-knative / hack

CI tooling to improve and automate CI and release management
Apache License 2.0
4 stars 16 forks source link

Generate build-args from image overrides and version #228

Closed mgencur closed 2 months ago

mgencur commented 2 months ago

Related to https://issues.redhat.com/browse/SRVCOM-3255

When serverless-operator includes imageOverrides in this format:

project:
  version: 1.34.1
imageOverrides:
  - name: GO_BUILDER
    pullSpec: "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17"
  - name: GO_RUNTIME
    pullSpec: "registry.access.redhat.com/ubi8/ubi-minimal"

The following build-args will be generated for Buildah in .tekton/docker-build.yaml when generating Konflux configurations:

- default:
    - "GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17"
    - "GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal"
    - "VERSION=1.34.1"
  description: Array of --build-arg values ("arg=value" strings) for buildah
  name: build-args
  type: array

If Tekton pipelines are being generated for midstream branch that doesn't have a corresponding serverless-operator branch, the "guessed" branch will be used for the VERSION (e.g. at this point for release-v1.15 of Eventing, the VERSION will be release-1.35

The imageOverrides can later specify production-ready base images that will replace the "CI" images when building with Konflux.

creydr commented 2 months ago

/retest Wondering, why the GH workflows are not triggered :thinking:

mgencur commented 2 months ago

Wondering, why the GH workflows are not triggered

Not sure which workflows you mean or where.

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mgencur, pierDipi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift-knative/hack/blob/main/OWNERS)~~ [mgencur,pierDipi] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
creydr commented 2 months ago

Wondering, why the GH workflows are not triggered

Not sure which workflows you mean or where.

image

mgencur commented 2 months ago

Generating Konflux files is part of "Generate CI Config"

creydr commented 2 months ago

Generating Konflux files is part of "Generate CI Config"

Yes, but these workflows (not even the unit tests) were triggered at that time. But as the run later as it seems, we're fine