diff --git a/Makefile b/Makefile index 38a53e00fdc..7e1ff3cf2ab 100644 --- a/Makefile +++ b/Makefile @@ -444,7 +444,7 @@ libzauth: kube-integration: kube-integration-setup kube-integration-test .PHONY: kube-integration-setup -kube-integration-setup: charts-integration +kube-integration-setup: charts-integration helm-oci-login export NAMESPACE=$(NAMESPACE); export HELM_PARALLELISM=$(HELM_PARALLELISM); ./hack/bin/integration-setup-federation.sh .PHONY: kube-integration-test @@ -468,6 +468,9 @@ kube-restart-%: kubectl delete pod -n $(NAMESPACE) -l app=$(*) kubectl delete pod -n $(NAMESPACE)-fed2 -l app=$(*) +helm-oci-login: + ./hack/bin/helm-oci-login.sh + .PHONY: latest-tag latest-tag: ./hack/bin/find-latest-docker-tag.sh diff --git a/hack/bin/helm-oci-login.sh b/hack/bin/helm-oci-login.sh new file mode 100755 index 00000000000..982d952e83b --- /dev/null +++ b/hack/bin/helm-oci-login.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +if [[ -z "${DOCKER_HUB_USERNAME+x}" ]]; then + echo "Not logging in to docker hub as there are no credentials provided." +else + helm registry login registry-1.docker.io --username "${DOCKER_HUB_USERNAME}" --password "${DOCKER_HUB_PASSWORD}" +fi