From 5c8925e6845d8af1d2ea2634be4cdb473d516d86 Mon Sep 17 00:00:00 2001 From: Chee Lu Date: Fri, 26 Jun 2026 06:39:46 -0400 Subject: [PATCH] Prow onboarding for osd-fleet-manager Onboard openshift-online/osd-fleet-manager to OpenShift CI (Prow): - CI operator config with nested-podman for PostgreSQL-dependent tests - Prow plugin and Tide merge configuration - OWNERS files for config, jobs, and prow directories Co-authored-by: Cursor --- .../openshift-online/osd-fleet-manager/OWNERS | 17 ++ ...enshift-online-osd-fleet-manager-main.yaml | 86 ++++++ .../openshift-online/osd-fleet-manager/OWNERS | 17 ++ ...ine-osd-fleet-manager-main-presubmits.yaml | 276 ++++++++++++++++++ .../openshift-online/osd-fleet-manager/OWNERS | 17 ++ .../osd-fleet-manager/_pluginconfig.yaml | 87 ++++++ .../osd-fleet-manager/_prowconfig.yaml | 16 + 7 files changed, 516 insertions(+) create mode 100644 ci-operator/config/openshift-online/osd-fleet-manager/OWNERS create mode 100644 ci-operator/config/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main.yaml create mode 100644 ci-operator/jobs/openshift-online/osd-fleet-manager/OWNERS create mode 100644 ci-operator/jobs/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main-presubmits.yaml create mode 100644 core-services/prow/02_config/openshift-online/osd-fleet-manager/OWNERS create mode 100644 core-services/prow/02_config/openshift-online/osd-fleet-manager/_pluginconfig.yaml create mode 100644 core-services/prow/02_config/openshift-online/osd-fleet-manager/_prowconfig.yaml diff --git a/ci-operator/config/openshift-online/osd-fleet-manager/OWNERS b/ci-operator/config/openshift-online/osd-fleet-manager/OWNERS new file mode 100644 index 0000000000000..2ec7a90cb4138 --- /dev/null +++ b/ci-operator/config/openshift-online/osd-fleet-manager/OWNERS @@ -0,0 +1,17 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/openshift-online/osd-fleet-manager root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- anfranci +- anrocha +- chlu +- chuluo +options: {} +reviewers: +- anfranci +- anrocha +- chlu +- chuluo diff --git a/ci-operator/config/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main.yaml b/ci-operator/config/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main.yaml new file mode 100644 index 0000000000000..851b9c9a343a8 --- /dev/null +++ b/ci-operator/config/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main.yaml @@ -0,0 +1,86 @@ +base_images: + nested-podman: + name: nested-podman + namespace: ci + tag: latest +build_root: + image_stream_tag: + name: builder + namespace: ocp + tag: rhel-9-golang-1.25-openshift-4.22 +images: + items: + - dockerfile_literal: | + FROM nested-podman + COPY src/ /opt/app-root/src + WORKDIR /opt/app-root/src/osd-fleet-manager + USER root + RUN dnf install -y git make gcc jq unzip curl podman-docker && dnf clean all + RUN curl -LO https://go.dev/dl/go1.25.7.linux-amd64.tar.gz && \ + tar -C /usr/local -xzf go1.25.7.linux-amd64.tar.gz && \ + rm go1.25.7.linux-amd64.tar.gz + ENV PATH="/usr/local/go/bin:${PATH}" + from: nested-podman + inputs: + src: + paths: + - destination_dir: src + source_path: /go/src/github.com/openshift-online/osd-fleet-manager + to: golang-plus +prowgen: + expose: true + private: true +resources: + '*': + limits: + memory: 4Gi + requests: + cpu: 100m + memory: 200Mi +tests: +- as: lint + commands: | + unset GOFLAGS + echo "Go Version: $(go version)" + make lint + container: + from: golang-plus +- as: unit-test + capabilities: + - nested-podman + commands: | + unset GOFLAGS + echo "Go Version: $(go version)" + go install gotest.tools/gotestsum@latest + export PATH="$(go env GOPATH)/bin:${PATH}" + make setup/secrets/empty + make ocm/setup aws/setup + export OCM_ENV=testing + make db/setup + sleep 5 + make test + container: + from: golang-plus + nested_podman: true +- as: integration-test + capabilities: + - nested-podman + commands: | + unset GOFLAGS + echo "Go Version: $(go version)" + go install gotest.tools/gotestsum@latest + export PATH="$(go env GOPATH)/bin:${PATH}" + make setup/secrets/empty + make ocm/setup aws/setup + export OCM_ENV=integration + make db/setup + sleep 5 + make db/migrate + make test/integration + container: + from: golang-plus + nested_podman: true +zz_generated_metadata: + branch: main + org: openshift-online + repo: osd-fleet-manager diff --git a/ci-operator/jobs/openshift-online/osd-fleet-manager/OWNERS b/ci-operator/jobs/openshift-online/osd-fleet-manager/OWNERS new file mode 100644 index 0000000000000..2ec7a90cb4138 --- /dev/null +++ b/ci-operator/jobs/openshift-online/osd-fleet-manager/OWNERS @@ -0,0 +1,17 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/openshift-online/osd-fleet-manager root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- anfranci +- anrocha +- chlu +- chuluo +options: {} +reviewers: +- anfranci +- anrocha +- chlu +- chuluo diff --git a/ci-operator/jobs/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main-presubmits.yaml b/ci-operator/jobs/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main-presubmits.yaml new file mode 100644 index 0000000000000..a7d667fc4d143 --- /dev/null +++ b/ci-operator/jobs/openshift-online/osd-fleet-manager/openshift-online-osd-fleet-manager-main-presubmits.yaml @@ -0,0 +1,276 @@ +presubmits: + openshift-online/osd-fleet-manager: + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build01 + context: ci/prow/images + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-online-osd-fleet-manager-main-images + rerun_command: /test images + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --oauth-token-path=/usr/local/github-credentials/oauth + - --report-credentials-file=/etc/report/credentials + - --target=[images] + command: + - ci-operator + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /usr/local/github-credentials + name: github-credentials-openshift-ci-robot-private-git-cloner + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: github-credentials-openshift-ci-robot-private-git-cloner + secret: + secretName: github-credentials-openshift-ci-robot-private-git-cloner + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )images,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/integration-test + decorate: true + decoration_config: + skip_cloning: true + labels: + capability/nested-podman: nested-podman + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-online-osd-fleet-manager-main-integration-test + rerun_command: /test integration-test + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --oauth-token-path=/usr/local/github-credentials/oauth + - --report-credentials-file=/etc/report/credentials + - --target=integration-test + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /usr/local/github-credentials + name: github-credentials-openshift-ci-robot-private-git-cloner + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: github-credentials-openshift-ci-robot-private-git-cloner + secret: + secretName: github-credentials-openshift-ci-robot-private-git-cloner + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )integration-test,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build01 + context: ci/prow/lint + decorate: true + decoration_config: + skip_cloning: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-online-osd-fleet-manager-main-lint + rerun_command: /test lint + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --oauth-token-path=/usr/local/github-credentials/oauth + - --report-credentials-file=/etc/report/credentials + - --target=lint + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /usr/local/github-credentials + name: github-credentials-openshift-ci-robot-private-git-cloner + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: github-credentials-openshift-ci-robot-private-git-cloner + secret: + secretName: github-credentials-openshift-ci-robot-private-git-cloner + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )lint,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/unit-test + decorate: true + decoration_config: + skip_cloning: true + labels: + capability/nested-podman: nested-podman + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-online-osd-fleet-manager-main-unit-test + rerun_command: /test unit-test + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --oauth-token-path=/usr/local/github-credentials/oauth + - --report-credentials-file=/etc/report/credentials + - --target=unit-test + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /usr/local/github-credentials + name: github-credentials-openshift-ci-robot-private-git-cloner + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: github-credentials-openshift-ci-robot-private-git-cloner + secret: + secretName: github-credentials-openshift-ci-robot-private-git-cloner + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )unit-test,?($|\s.*) diff --git a/core-services/prow/02_config/openshift-online/osd-fleet-manager/OWNERS b/core-services/prow/02_config/openshift-online/osd-fleet-manager/OWNERS new file mode 100644 index 0000000000000..2ec7a90cb4138 --- /dev/null +++ b/core-services/prow/02_config/openshift-online/osd-fleet-manager/OWNERS @@ -0,0 +1,17 @@ +# DO NOT EDIT; this file is auto-generated using https://github.com/openshift/ci-tools. +# Fetched from https://github.com/openshift-online/osd-fleet-manager root OWNERS +# If the repo had OWNERS_ALIASES then the aliases were expanded +# Logins who are not members of 'openshift' organization were filtered out +# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md + +approvers: +- anfranci +- anrocha +- chlu +- chuluo +options: {} +reviewers: +- anfranci +- anrocha +- chlu +- chuluo diff --git a/core-services/prow/02_config/openshift-online/osd-fleet-manager/_pluginconfig.yaml b/core-services/prow/02_config/openshift-online/osd-fleet-manager/_pluginconfig.yaml new file mode 100644 index 0000000000000..e209171c5072d --- /dev/null +++ b/core-services/prow/02_config/openshift-online/osd-fleet-manager/_pluginconfig.yaml @@ -0,0 +1,87 @@ +approve: +- repos: + - openshift-online/osd-fleet-manager + require_self_approval: false +external_plugins: + openshift-online/osd-fleet-manager: + - endpoint: http://refresh + events: + - issue_comment + name: refresh + - endpoint: http://cherrypick + events: + - issue_comment + - pull_request + name: cherrypick + - endpoint: http://needs-rebase + events: + - issue_comment + - pull_request + name: needs-rebase + - endpoint: http://backport-verifier + events: + - issue_comment + - pull_request + name: backport-verifier + - endpoint: http://payload-testing-prow-plugin + events: + - issue_comment + name: payload-testing-prow-plugin + - endpoint: http://jira-lifecycle-plugin + events: + - issue_comment + - pull_request + - pull_request_review + name: jira-lifecycle-plugin + - endpoint: http://pipeline-controller + events: + - pull_request + - issue_comment + name: pipeline-controller + - endpoint: http://multi-pr-prow-plugin + events: + - issue_comment + name: multi-pr-prow-plugin + - endpoint: http://ship-hook + events: + - pull_request + - issue_comment + - pull_request_review + name: ship-hook +lgtm: +- repos: + - openshift-online/osd-fleet-manager + review_acts_as_lgtm: true +plugins: + openshift-online/osd-fleet-manager: + plugins: + - assign + - blunderbuss + - cat + - dog + - heart + - golint + - goose + - help + - hold + - jira + - label + - lgtm + - lifecycle + - override + - pony + - retitle + - shrug + - sigmention + - skip + - trigger + - verify-owners + - owners-label + - wip + - yuks + - approve +triggers: +- repos: + - openshift-online/osd-fleet-manager + trusted_apps: + - openshift-merge-bot diff --git a/core-services/prow/02_config/openshift-online/osd-fleet-manager/_prowconfig.yaml b/core-services/prow/02_config/openshift-online/osd-fleet-manager/_prowconfig.yaml new file mode 100644 index 0000000000000..1ceb8329da939 --- /dev/null +++ b/core-services/prow/02_config/openshift-online/osd-fleet-manager/_prowconfig.yaml @@ -0,0 +1,16 @@ +tide: + merge_method: + openshift-online/osd-fleet-manager: squash + queries: + - labels: + - approved + - lgtm + missingLabels: + - backports/unvalidated-commits + - do-not-merge/hold + - do-not-merge/invalid-owners-file + - do-not-merge/work-in-progress + - jira/invalid-bug + - needs-rebase + repos: + - openshift-online/osd-fleet-manager