diff --git a/ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml b/ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml index a535ce4fffded..06a5430308639 100644 --- a/ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml +++ b/ci-operator/config/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main.yaml @@ -13,12 +13,19 @@ resources: memory: 2Gi tests: - as: generate - commands: make manifests && git diff --exit-code + commands: GOFLAGS="-mod=readonly" GOMODCACHE=/tmp/gomodcache make manifests && git + diff --exit-code + container: + from: src + skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$ +- as: api-lint + commands: GOFLAGS="-mod=mod" GOMODCACHE=/tmp/gomodcache GOLANGCI_LINT_CACHE=/tmp/.cache + make api-lint container: from: src skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$ - as: unit - commands: make test + commands: GOFLAGS="-mod=readonly" GOMODCACHE=/tmp/gomodcache make test container: from: src skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$ diff --git a/ci-operator/jobs/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main-presubmits.yaml b/ci-operator/jobs/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main-presubmits.yaml index 09dd300d7e85f..3dc1f82168d16 100644 --- a/ci-operator/jobs/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main-presubmits.yaml +++ b/ci-operator/jobs/openshift/lightspeed-agentic-operator/openshift-lightspeed-agentic-operator-main-presubmits.yaml @@ -1,5 +1,69 @@ presubmits: openshift/lightspeed-agentic-operator: + - agent: kubernetes + always_run: false + branches: + - ^main$ + - ^main- + cluster: build02 + context: ci/prow/api-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-lightspeed-agentic-operator-main-api-lint + rerun_command: /test api-lint + skip_if_only_changed: ^docs/|\.md$|^(?:.*/)?(?:\.gitignore|OWNERS|LICENSE)$ + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --report-credentials-file=/etc/report/credentials + - --target=api-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: /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: 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( | .* )api-lint,?($|\s.*) - agent: kubernetes always_run: false branches: