From b3d7d657d5eb5ecb4a764126dcf8ad834d315bdb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 24 Aug 2018 13:52:01 -0700 Subject: [PATCH] openshift-installer-presubmits: Add go-fmt We've had some gofmt issues sneak in recently [1]. We want to catch that sort of thing in CI, instead of finding out about it later. This commit uses the script from openshift/installer@94a2a8ca (hack/go-fmt: Make it easy to auto-format Go, 2018-08-24, openshift/installer#173) to automate that check. [1]: https://github.com/openshift/installer/commit/8f415b93d638966481d616d2cdb983cc3fde9b4f#commitcomment-30284820 --- .../openshift-installer-presubmits.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ci-operator/jobs/openshift/installer/openshift-installer-presubmits.yaml b/ci-operator/jobs/openshift/installer/openshift-installer-presubmits.yaml index 6994f9a83206d..d3cd84df19e31 100644 --- a/ci-operator/jobs/openshift/installer/openshift-installer-presubmits.yaml +++ b/ci-operator/jobs/openshift/installer/openshift-installer-presubmits.yaml @@ -232,6 +232,26 @@ presubmits: - ./hack/test-bazel-build-tarball.sh - --action_env=HOME=/tmp + - name: ci-pull-openshift-installer-go-fmt + trigger: "(?m)^/test go-fmt" + rerun_command: "/test go-fmt" + context: ci/prow/go-fmt + always_run: true + skip_report: false + agent: kubernetes + decorate: true + spec: + containers: + - image: quay.io/coreos/golang-testing + env: + - name: IS_CONTAINER + value: 'TRUE' + command: + - sh + args: + - ./hack/go-fmt.sh + - . + - name: ci-pull-openshift-installer-go-vet trigger: "(?m)^/test go-vet" rerun_command: "/test go-vet"