mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
Ensure helm is installed and move shebang to top of file
This commit is contained in:
16
Makefile
16
Makefile
@@ -25,7 +25,7 @@ ARCHS = amd64 arm arm64
|
|||||||
LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}.buildDate=${BUILD} -X ${LDFLAG_LOCATION}.gitbranch=${BRANCH} -X ${LDFLAG_LOCATION}.gitsha1=${SHA1}"
|
LDFLAGS=-ldflags "-X ${LDFLAG_LOCATION}.version=${VERSION} -X ${LDFLAG_LOCATION}.buildDate=${BUILD} -X ${LDFLAG_LOCATION}.gitbranch=${BRANCH} -X ${LDFLAG_LOCATION}.gitsha1=${SHA1}"
|
||||||
|
|
||||||
GOLANGCI_VERSION := v1.30.0
|
GOLANGCI_VERSION := v1.30.0
|
||||||
HAS_GOLANGCI := $(shell ls _output/bin/golangci-lint)
|
HAS_GOLANGCI := $(shell ls _output/bin/golangci-lint 2> /dev/null)
|
||||||
|
|
||||||
# REGISTRY is the container registry to push
|
# REGISTRY is the container registry to push
|
||||||
# into. The default is to push to the staging
|
# into. The default is to push to the staging
|
||||||
@@ -43,7 +43,7 @@ IMAGE_GCLOUD:=$(REGISTRY)/descheduler:$(VERSION)
|
|||||||
# In the future binaries can be uploaded to
|
# In the future binaries can be uploaded to
|
||||||
# GCS bucket gs://k8s-staging-descheduler.
|
# GCS bucket gs://k8s-staging-descheduler.
|
||||||
|
|
||||||
HAS_HELM := $(shell which helm)
|
HAS_HELM := $(shell which helm 2> /dev/null)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@@ -135,11 +135,13 @@ ifndef HAS_GOLANGCI
|
|||||||
endif
|
endif
|
||||||
./_output/bin/golangci-lint run
|
./_output/bin/golangci-lint run
|
||||||
|
|
||||||
lint-chart:
|
lint-chart: ensure-helm-install
|
||||||
ifndef HAS_HELM
|
|
||||||
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && chmod 700 ./get_helm.sh && ./get_helm.sh
|
|
||||||
endif
|
|
||||||
helm lint ./charts/descheduler
|
helm lint ./charts/descheduler
|
||||||
|
|
||||||
test-helm:
|
test-helm: ensure-helm-install
|
||||||
./test/run-helm-tests.sh
|
./test/run-helm-tests.sh
|
||||||
|
|
||||||
|
ensure-helm-install:
|
||||||
|
ifndef HAS_HELM
|
||||||
|
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 && chmod 700 ./get_helm.sh && ./get_helm.sh
|
||||||
|
endif
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright 2017 The Kubernetes Authors.
|
# Copyright 2017 The Kubernetes Authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -12,8 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright 2021 The Kubernetes Authors.
|
# Copyright 2021 The Kubernetes Authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -12,7 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright 2017 The Kubernetes Authors.
|
# Copyright 2017 The Kubernetes Authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@@ -12,8 +14,6 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|||||||
Reference in New Issue
Block a user