Skip to content

Commit

Permalink
better err msg, if env var is missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
guettli committed Jan 8, 2025
1 parent 680f011 commit 20b0512
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,12 @@ test-unit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests
e2e-image: ## Build the e2e manager image
docker build --pull --build-arg ARCH=$(ARCH) --build-arg LDFLAGS="$(LDFLAGS)" -t $(IMAGE_PREFIX)/$(STAGING_IMAGE):e2e -f images/$(INFRA_SHORT)/Dockerfile .

.PHONY: $(E2E_CONF_FILE)
.PHONY: e2e-conf-file
e2e-conf-file: $(E2E_CONF_FILE)
$(E2E_CONF_FILE): $(ENVSUBST) $(E2E_CONF_FILE_SOURCE)
mkdir -p $(shell dirname $(E2E_CONF_FILE))
MANAGEMENT_CLUSTER_NAME="$(INFRA_SHORT)-e2e-$$(date +"%Y%m%d-%H%M%S")-$$USER" $(ENVSUBST) < $(E2E_CONF_FILE_SOURCE) > $(E2E_CONF_FILE)
./hack/ensure-env-variables.sh CAPH_LATEST_VERSION
$(ENVSUBST) < $(E2E_CONF_FILE_SOURCE) > $(E2E_CONF_FILE)

.PHONY: test-e2e
test-e2e: $(E2E_CONF_FILE) $(if $(SKIP_IMAGE_BUILD),,e2e-image) $(ARTIFACTS)
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/config/hetzner-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ providers:
- name: hetzner
type: InfrastructureProvider
versions:
- name: ${CAPH_LATEST_VERSION:-} # latest published release
value: https://github.com/syself/cluster-api-provider-hetzner/releases/download/${CAPH_LATEST_VERSION:-}/infrastructure-components.yaml
- name: ${CAPH_LATEST_VERSION} # latest published release
value: https://github.com/syself/cluster-api-provider-hetzner/releases/download/${CAPH_LATEST_VERSION}/infrastructure-components.yaml
type: "url"
contract: v1beta1
files:
Expand Down Expand Up @@ -123,7 +123,7 @@ variables:
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.5/clusterctl-linux-amd64"
INIT_WITH_PROVIDERS_CONTRACT: "v1beta1"
INIT_WITH_KUBERNETES_VERSION: "v1.29.4"
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION:-}
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION}

# Cluster Addons
CILIUM: "./data/cni/cilium/cilium.yaml"
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/config/hetzner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ providers:
- name: hetzner
type: InfrastructureProvider
versions:
- name: ${CAPH_LATEST_VERSION:-} # latest published release
value: https://github.com/syself/cluster-api-provider-hetzner/releases/download/${CAPH_LATEST_VERSION:-}/infrastructure-components.yaml
- name: ${CAPH_LATEST_VERSION} # latest published release
value: https://github.com/syself/cluster-api-provider-hetzner/releases/download/${CAPH_LATEST_VERSION}/infrastructure-components.yaml
type: "url"
contract: v1beta1
files:
Expand Down Expand Up @@ -128,8 +128,8 @@ variables:
# the management cluster to be upgraded.
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.7.5/clusterctl-linux-amd64"
INIT_WITH_PROVIDERS_CONTRACT: "v1beta1"
INIT_WITH_KUBERNETES_VERSION: "v1.28.9"
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION:-}
INIT_WITH_KUBERNETES_VERSION: "v1.29.4"
INIT_WITH_INFRASTRUCTURE_PROVIDER_VERSION: ${CAPH_LATEST_VERSION}

# Cluster Addons
CILIUM: "./data/cni/cilium/cilium.yaml"
Expand Down

0 comments on commit 20b0512

Please sign in to comment.