Skip to content

Commit

Permalink
added make target for checking for hashicorppreview (#2603)
Browse files Browse the repository at this point in the history
* added make target for checking for hashicorppreview

* added check to prepare-release make target
  • Loading branch information
wilkermichael authored Jul 21, 2023
1 parent 8b45de8 commit efa2be8
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 @@ -97,6 +97,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 @@ -221,7 +225,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 @@ -234,7 +238,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 efa2be8

Please sign in to comment.