Skip to content

Commit

Permalink
Backport of added make target for checking for hashicorppreview into …
Browse files Browse the repository at this point in the history
…release/1.1.x (#2624)

* backport of commit 853a9d1

* backport of commit 128d8a7

---------

Co-authored-by: Michael Wilkerson <[email protected]>
  • Loading branch information
1 parent 95fab39 commit e436f7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ terraform-fmt:
@terraform fmt -recursive
.PHONY: terraform-fmt

# Check for hashicorppreview containers
check-preview-containers:
@source $(CURDIR)/control-plane/build-support/scripts/check-hashicorppreview.sh


# ===========> CLI Targets
cli-dev:
Expand Down Expand Up @@ -200,7 +204,7 @@ aks-test-packages:
check-env:
@printenv | grep "CONSUL_K8S"

prepare-release: ## Sets the versions, updates changelog to prepare this repository to release
prepare-release-script: ## Sets the versions, updates changelog to prepare this repository to release
ifndef CONSUL_K8S_RELEASE_VERSION
$(error CONSUL_K8S_RELEASE_VERSION is required)
endif
Expand All @@ -213,7 +217,9 @@ endif
ifndef CONSUL_K8S_CONSUL_VERSION
$(error CONSUL_K8S_CONSUL_VERSION is required)
endif
source $(CURDIR)/control-plane/build-support/scripts/functions.sh; prepare_release $(CURDIR) $(CONSUL_K8S_RELEASE_VERSION) "$(CONSUL_K8S_RELEASE_DATE)" $(CONSUL_K8S_LAST_RELEASE_GIT_TAG) $(CONSUL_K8S_CONSUL_VERSION) $(CONSUL_K8S_CONSUL_DATAPLANE_VERSION) $(CONSUL_K8S_PRERELEASE_VERSION)
@source $(CURDIR)/control-plane/build-support/scripts/functions.sh; prepare_release $(CURDIR) $(CONSUL_K8S_RELEASE_VERSION) "$(CONSUL_K8S_RELEASE_DATE)" $(CONSUL_K8S_LAST_RELEASE_GIT_TAG) $(CONSUL_K8S_CONSUL_VERSION) $(CONSUL_K8S_CONSUL_DATAPLANE_VERSION) $(CONSUL_K8S_PRERELEASE_VERSION); \

prepare-release: prepare-release-script check-preview-containers

prepare-dev:
ifndef CONSUL_K8S_RELEASE_VERSION
Expand Down
9 changes: 9 additions & 0 deletions control-plane/build-support/scripts/check-hashicorppreview.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
echo "Checking charts for hashicorpreview images. . ."
if grep -rnw -e 'hashicorppreview' './charts'; then
echo Charts contain hashicorppreview images. If this is intended for release, please remove the preview images.
else
echo Charts do not contain hashicorpreview images, ready for release!
fi

0 comments on commit e436f7d

Please sign in to comment.