Skip to content

Commit

Permalink
Backport of Pin Kind versions on release branches into release/1.2.x (#…
Browse files Browse the repository at this point in the history
…2399) (#2408)

* backport of commit eabe144

* backport of commit 2c23f40

* backport of commit ad60fd7

* backport of commit 696945b

* backport of commit ab760ea

---------

Co-authored-by: hc-github-team-consul-core <[email protected]>
Co-authored-by: Curt Bushko <[email protected]>
  • Loading branch information
3 people committed Jun 21, 2023
1 parent b51c8a8 commit 32d9f6d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ VERSION = $(shell ./control-plane/build-support/scripts/version.sh control-plane
CONSUL_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-version.sh charts/consul/values.yaml)
CONSUL_ENTERPRISE_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-enterprise-version.sh charts/consul/values.yaml)
CONSUL_DATAPLANE_IMAGE_VERSION = $(shell ./control-plane/build-support/scripts/consul-dataplane-version.sh charts/consul/values.yaml)
KIND_VERSION= $(shell ./control-plane/build-support/scripts/read-yaml-config.sh acceptance/ci-inputs/kind-inputs.yaml .kindVersion)
KIND_NODE_IMAGE= $(shell ./control-plane/build-support/scripts/read-yaml-config.sh acceptance/ci-inputs/kind-inputs.yaml .kindNodeImage)
KUBECTL_VERSION= $(shell ./control-plane/build-support/scripts/read-yaml-config.sh acceptance/ci-inputs/kind-inputs.yaml .kubectlVersion)

# ===========> Helm Targets

Expand Down Expand Up @@ -105,7 +108,6 @@ terraform-fmt:


# ===========> CLI Targets

cli-dev:
@echo "==> Installing consul-k8s CLI tool for ${GOOS}/${GOARCH}"
@cd cli; go build -o ./bin/consul-k8s; cp ./bin/consul-k8s ${GOPATH}/bin/
Expand All @@ -114,7 +116,6 @@ cli-fips-dev:
@echo "==> Installing consul-k8s CLI tool for ${GOOS}/${GOARCH}"
@cd cli; CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build -o ./bin/consul-k8s -tags "fips"; cp ./bin/consul-k8s ${GOPATH}/bin/


cli-lint: ## Run linter in the control-plane directory.
cd cli; golangci-lint run -c ../.golangci.yml

Expand Down Expand Up @@ -187,6 +188,16 @@ consul-enterprise-version:
consul-dataplane-version:
@echo $(CONSUL_DATAPLANE_IMAGE_VERSION)

kind-version:
@echo $(KIND_VERSION)

kind-node-image:
@echo $(KIND_NODE_IMAGE)

kubectl-version:
@echo $(KUBECTL_VERSION)



# ===========> Release Targets

Expand Down
3 changes: 3 additions & 0 deletions acceptance/ci-inputs/kind-inputs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
kindVersion: v0.19.0
kindNodeImage: kindest/node:v1.27.1
kubectlVersion: v1.27.1
10 changes: 10 additions & 0 deletions control-plane/build-support/scripts/read-yaml-config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
INPUT_FILE=$1
FIELD=$2

VALUE=$(yq $FIELD $INPUT_FILE)

echo "${VALUE}"

0 comments on commit 32d9f6d

Please sign in to comment.