k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/Makefile (about)

     1  # Copyright 2021 The Kubernetes Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  ################################################################################
    16  # ========================== Capture Environment ===============================
    17  # get the repo root and output path
    18  REPO_ROOT:=${CURDIR}
    19  OUT_DIR=$(REPO_ROOT)/_output
    20  # image building and publishing config
    21  REGISTRY ?= gcr.io/k8s-prow
    22  PROW_IMAGE ?=
    23  ################################################################################
    24  # ================================= Testing ====================================
    25  # unit tests (hermetic)
    26  unit: go-unit py-unit
    27  .PHONY: unit
    28  go-unit:
    29  	hack/make-rules/go-test/unit.sh
    30  .PHONY: go-unit
    31  py-unit:
    32  	hack/make-rules/py-test/all.sh
    33  .PHONY: py-unit
    34  # integration tests
    35  # integration:
    36  #	hack/make-rules/go-test/integration.sh
    37  # all tests
    38  test: unit
    39  .PHONY: test
    40  ################################################################################
    41  # ================================= Cleanup ====================================
    42  # standard cleanup target
    43  clean:
    44  	rm -rf "$(OUT_DIR)/"
    45  ################################################################################
    46  # ============================== Auto-Update ===================================
    47  # update generated code, gofmt, etc.
    48  # update:
    49  #	hack/make-rules/update/all.sh
    50  # update generated code
    51  #generate:
    52  #	hack/make-rules/update/generated.sh
    53  # gofmt
    54  #gofmt:
    55  #	hack/make-rules/update/gofmt.sh
    56  .PHONY: update-go-deps
    57  update-go-deps:
    58  	hack/make-rules/update/go-deps.sh
    59  .PHONY: verify-go-deps
    60  verify-go-deps:
    61  	hack/make-rules/verify/go-deps.sh
    62  # ======================== Image Building/Publishing ===========================
    63  # Build and publish miscellaneous images that get pushed to "gcr.io/k8s-prow/".
    64  # These are not prow images, but published there for legacy reasons.
    65  # The full set of images covered by these targets is configured in
    66  # .k8s-prow-images.yaml.
    67  .PHONY: push-misc-images
    68  push-misc-images:
    69  	./hack/make-rules/go-run/arbitrary.sh run ./hack/prowimagebuilder --prow-images-file=./.k8s-prow-images.yaml --ko-docker-repo="${REGISTRY}" --push=true
    70  
    71  .PHONY: build-misc-images
    72  build-misc-images:
    73  	./hack/make-rules/go-run/arbitrary.sh run ./hack/prowimagebuilder --prow-images-file=./.k8s-prow-images.yaml --ko-docker-repo="ko.local" --push=false
    74  
    75  .PHONY: push-single-image
    76  push-single-image:
    77  	./hack/make-rules/go-run/arbitrary.sh run ./hack/prowimagebuilder --prow-images-file=./.k8s-prow-images.yaml --ko-docker-repo="${REGISTRY}" --push=true --image=${PROW_IMAGE}
    78  
    79  .PHONY: build-single-image
    80  build-single-image:
    81  	./hack/make-rules/go-run/arbitrary.sh run ./hack/prowimagebuilder --prow-images-file=./.k8s-prow-images.yaml --ko-docker-repo="ko.local" --push=false --image=${PROW_IMAGE}
    82  
    83  ################################################################################
    84  # ================================== Linting ===================================
    85  # run linters, ensure generated code, etc.
    86  .PHONY: verify
    87  verify:
    88  	hack/make-rules/verify/all.sh
    89  # typescript linting
    90  .PHONY: verify-eslint
    91  verify-eslint:
    92  	hack/make-rules/verify/eslint.sh
    93  # go linters
    94  .PHONY: go-lint
    95  go-lint:
    96  	hack/make-rules/verify/golangci-lint.sh
    97  .PHONY: py-lint
    98  py-lint:
    99  	hack/make-rules/verify/pylint.sh
   100  .PHONY: update-gofmt
   101  update-gofmt:
   102  	hack/make-rules/update/gofmt.sh
   103  .PHONY: verify-gofmt
   104  verify-gofmt:
   105  	hack/make-rules/verify/gofmt.sh
   106  .PHONY: update-file-perms
   107  update-file-perms:
   108  	hack/make-rules/update/file-perms.sh
   109  .PHONY: verify-file-perms
   110  verify-file-perms:
   111  	hack/make-rules/verify/file-perms.sh
   112  .PHONY: update-spelling
   113  update-spelling:
   114  	hack/make-rules/update/misspell.sh
   115  .PHONY: verify-spelling
   116  verify-spelling:
   117  	hack/make-rules/verify/misspell.sh
   118  .PHONY: update-labels
   119  update-labels:
   120  	hack/make-rules/update/labels.sh
   121  .PHONY: verify-labels
   122  verify-labels:
   123  	hack/make-rules/verify/labels.sh
   124  .PHONY: verify-boilerplate
   125  verify-boilerplate:
   126  	hack/make-rules/verify/boilerplate.sh
   127  .PHONY: verify-yamllint
   128  verify-yamllint:
   129  	hack/make-rules/verify/yamllint.sh
   130  #################################################################################