diff --git a/ci-operator/config/openshift/aws-account-operator/openshift-aws-account-operator-master.yaml b/ci-operator/config/openshift/aws-account-operator/openshift-aws-account-operator-master.yaml index 8747b0180c440..d90a321f6204c 100644 --- a/ci-operator/config/openshift/aws-account-operator/openshift-aws-account-operator-master.yaml +++ b/ci-operator/config/openshift/aws-account-operator/openshift-aws-account-operator-master.yaml @@ -4,6 +4,14 @@ images: items: - dockerfile_path: build/Dockerfile to: aws-account-operator + - dockerfile_literal: | + FROM src + RUN PREK_VERSION="$(tr -d '[:space:]' < .prek-version 2>/dev/null || true)" \ + && PREK_VERSION="${PREK_VERSION:-v0.3.9}" \ + && curl -fsSL "https://github.com/j178/prek/releases/download/${PREK_VERSION}/prek-x86_64-unknown-linux-gnu.tar.gz" \ + | tar xzf - --strip-components=1 -C /usr/local/bin/ prek-x86_64-unknown-linux-gnu/prek + from: src + to: prek-runner resources: '*': limits: @@ -47,6 +55,20 @@ tests: container: from: src skip_if_only_changed: ^(?:\.tekton|\.github)|\.md$|^(?:\.gitignore|OWNERS|LICENSE)$ +- as: prek + commands: | + export PREK_HOME=/tmp/prek + cd /go/src/github.com/openshift/aws-account-operator + git init + git add -A + if [ -x hack/ci.sh ]; then + ./hack/ci.sh + else + prek run --all-files + fi + container: + from: prek-runner + skip_if_only_changed: ^(?:\.tekton|\.github)|\.md$|^(?:\.gitignore|OWNERS|LICENSE)$ - always_run: false as: integration-test cluster_claim: diff --git a/ci-operator/jobs/openshift/aws-account-operator/openshift-aws-account-operator-master-presubmits.yaml b/ci-operator/jobs/openshift/aws-account-operator/openshift-aws-account-operator-master-presubmits.yaml index 674dfc803a55f..b3b088d083777 100644 --- a/ci-operator/jobs/openshift/aws-account-operator/openshift-aws-account-operator-master-presubmits.yaml +++ b/ci-operator/jobs/openshift/aws-account-operator/openshift-aws-account-operator-master-presubmits.yaml @@ -271,6 +271,68 @@ presubmits: secret: secretName: result-aggregator trigger: (?m)^/test( | .* )lint,?($|\s.*) + - agent: kubernetes + always_run: false + branches: + - ^master$ + - ^master- + cluster: build06 + context: ci/prow/prek + decorate: true + labels: + ci.openshift.io/generator: prowgen + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-openshift-aws-account-operator-master-prek + rerun_command: /test prek + skip_if_only_changed: ^(?:\.tekton|\.github)|\.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=prek + 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( | .* )prek,?($|\s.*) - agent: kubernetes always_run: false branches: