diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 000000000..1cb46bdac --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "branchPrefix": "renovate/", + "baseBranches": ["main", "rhoai-2.16", "rhoai-2.17", "rhoai-2.13", "rhoai-2.18"], + "ignoreTests": true, + "automergeType": "pr", + "automerge": true, + "enabledManagers": ["dockerfile", "tekton", "rpm"], + "packageRules": [ + { + "matchManagers": ["dockerfile"], + "matchBaseBranches": ["main", "rhoai-2.16", "rhoai-2.17", "rhoai-2.13"], + "matchUpdateTypes": ["digest"], + "matchFileNames": ["*Dockerfile.konflux*"], + "enabled": true, + "ignoreTests": true, + "automergeType": "pr", + "automerge": true, + "groupName": "Dockerfile Digest Updates", + "branchPrefix": "renovate/docker-main/", + "semanticCommits": "enabled" + }, + { + "matchManagers": ["dockerfile"], + "matchBaseBranches": ["rhoai-2.18"], + "enabled": false + }, + { + "matchManagers": ["tekton"], + "matchBaseBranches": ["rhoai-2.16", "rhoai-2.17", "rhoai-2.13"], + "matchUpdateTypes": ["digest"], + "enabled": true, + "groupName": "Tekton Updates", + "branchPrefix": "renovate/tekton-rhoai-2.16/", + "semanticCommits": "enabled", + "prFooter": "To execute skipped test pipelines write comment `/ok-to-test`", + "matchPackageNames": [ + "/^quay.io/redhat-appstudio-tekton-catalog//", + "/^quay.io/konflux-ci/tekton-catalog//" + ] + }, + { + "matchManagers": ["rpm"], + "matchBaseBranches": ["main", "rhoai-2.16", "rhoai-2.17", "rhoai-2.13"], + "groupName": "RPM Updates", + "commitMessageTopic": "RPM updates", + "enabled": true, + "schedule": ["at any time"], + "branchPrefix": "renovate/rpm/", + "semanticCommits": "enabled" + } + ], + "dockerfile": { + "enabled": true, + "schedule": ["at any time"], + "additionalBranchPrefix": "{{baseBranch}}/", + "branchPrefix": "konflux/mintmaker/", + "ignoreTests": true, + "automergeType": "pr", + "automerge": true, + "packageRules": [ + { + "matchUpdateTypes": [ + "major", + "minor", + "pin", + "pinDigest", + "patch", + "bump" + ], + "enabled": false + } + ], + "ignorePaths": [ + "**/Dockerfile", + "!**/Dockerfile.konflux*" + ], + "pinDigests": true + }, + "tekton": { + "enabled": true, + "schedule": ["at any time"], + "fileMatch": ["\\.yaml$", "\\.yml$"], + "includePaths": [".tekton/**"], + "packageRules": [ + { + "matchUpdateTypes": [ + "major", + "minor", + "pin", + "pinDigest", + "patch", + "bump" + ], + "enabled": false + }, + { + "matchUpdateTypes": ["digest"], + "enabled": true, + "groupName": "Konflux references", + "branchPrefix": "konflux/references/", + "semanticCommits": "enabled", + "prFooter": "To execute skipped test pipelines write comment `/ok-to-test`", + "prBodyColumns": ["Package", "Change", "Notes"], + "prBodyDefinitions": { + "Notes": "{{#if (or (containsString updateType 'minor') (containsString updateType 'major'))}}:warning:[migration](https://github.com/redhat-appstudio/build-definitions/blob/main/task/{{{replace '^quay.io/(redhat-appstudio-tekton-catalog|konflux-ci/tekton-catalog)/task-' '' packageName}}}/{{{newVersion}}}/MIGRATION.md):warning:{{/if}}" + }, + "prBodyTemplate": "{{{header}}}{{{table}}}{{{notes}}}{{{changelogs}}}{{{controls}}}{{{footer}}}", + "recreateWhen": "always", + "rebaseWhen": "behind-base-branch", + "matchPackageNames": [ + "/^quay.io/redhat-appstudio-tekton-catalog//", + "/^quay.io/konflux-ci/tekton-catalog//" + ] + } + ] + }, + "rpm": { + "enabled": true, + "schedule": ["at any time"] + }, + "prHourlyLimit": 0 + } diff --git a/Dockerfile.konflux b/Dockerfile.konflux new file mode 100644 index 000000000..37a682eb5 --- /dev/null +++ b/Dockerfile.konflux @@ -0,0 +1,63 @@ +# Build arguments +ARG SOURCE_CODE=. + +# BEGIN -- workaround lack of go-toolset for golang 1.23 +ARG GOLANG_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_golang_1.23@sha256:ca0c771ecd4f606986253f747e2773fe2960a6b5e8e7a52f6a4797b173ac7f56 +FROM ${GOLANG_IMAGE} AS golang + +FROM registry.access.redhat.com/ubi8/ubi@sha256:fd93fc09dc09f3d3edae30577460a979bb52df351b826ef3a5c02ec8213b433a AS builder +ARG GOLANG_VERSION=1.23.0 + +# Install system dependencies +RUN dnf upgrade -y && dnf install -y \ + gcc \ + make \ + openssl-devel \ + git \ + && dnf clean all && rm -rf /var/cache/yum + +# Install Go +ENV PATH=/usr/local/go/bin:$PATH + +COPY --from=golang /usr/lib/golang /usr/local/go +# End of Go versioning workaround + +WORKDIR /workspace + +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY . . + +# Copy the Go sources +COPY main.go main.go +COPY pkg/ pkg/ + +RUN git config --global --add safe.directory /workspace + +# Build +USER root + +RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -tags strictfipsruntime -a -o manager main.go + +FROM registry.access.redhat.com/ubi8/ubi-minimal@sha256:d16d4445b1567f29449fba3b6d2bc37db467dc3067d33e940477e55aecdf6e8e +WORKDIR / +COPY --from=builder /workspace/manager . + +USER 65532:65532 +ENTRYPOINT ["/manager"] + +LABEL com.redhat.component="odh-codeflare-operator-container" \ + description="Manages lifecycle of MCAD and InstaScale custom resources and associated Kubernetes resources" \ + name="managed-open-data-hub/odh-codeflare-operator-container-rhel8" \ + summary="odh-codeflare-operator-container" \ + maintainer="['managed-open-data-hub@redhat.com']" \ + io.openshift.expose-services="" \ + io.k8s.display-name="odh-codeflare-operator-container" \ + io.k8s.description="odh-codeflare-operator" \ + com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"