11# SPDX-FileCopyrightText: (C) 2025 Intel Corporation
22# SPDX-License-Identifier: Apache-2.0
33
4+ SHELL := bash -eu -o pipefail
5+
46# VERSION defines the project version for the bundle.
57# Update this value when you upgrade the version of your project.
68# To re-generate a bundle for another specific version without changing the standard setup, you can:
@@ -97,11 +99,6 @@ DISABLE_AUTH ?= true
9799# Should be true for CO subsystem integration tests if inventory is not deployed
98100DISABLE_INV ?= true
99101
100- # Setting SHELL to bash allows bash commands to be executed by recipes.
101- # Options are set to exit when a recipe line exits non-zero or a piped command fails.
102- SHELL = /usr/bin/env bash -o pipefail
103- .SHELLFLAGS = -ec
104-
105102.PHONY : all
106103all : help
107104
@@ -242,6 +239,20 @@ docker-push-template-controller: ## Push docker image with the controller.
242239docker-push-cluster-manager : # # Push docker image with the cluster manager.
243240 $(CONTAINER_TOOL ) push ${DOCKER_IMAGE_CLUSTER_MANAGER}
244241
242+ .PHONY : docker-list
243+ docker-list : # # Print name of docker container images
244+ @echo " images:"
245+ @echo " template-controller:"
246+ @echo " name: '$( DOCKER_IMAGE_TEMPLATE_CONTROLLER) '"
247+ @echo " version: '$( VERSION) '"
248+ @echo " gitTagPrefix: 'v'"
249+ @echo " buildTarget: 'docker-build-template-controller'"
250+ @echo " cluster-manager:"
251+ @echo " name: '$( DOCKER_IMAGE_CLUSTER_MANAGER) '"
252+ @echo " version: '$( VERSION) '"
253+ @echo " gitTagPrefix: 'v'"
254+ @echo " buildTarget: 'docker-build-cluster-manager'"
255+
245256# PLATFORMS defines the target platforms for the manager image be built to provide support to multiple
246257# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
247258# - be able to use docker buildx. More info: https://docs.docker.com/build/buildx/
@@ -292,10 +303,20 @@ helm-build: ## Package helm charts.
292303 yq eval -i ' .annotations.created = "${LABEL_CREATED}"' $$ d/Chart.yaml; \
293304 helm package --app-version=${VERSION} --version=${HELM_VERSION} --debug -u $$ d -d $(BUILD_DIR ) ; \
294305 done
295-
296- # revert the temporary changes done in Chart.yaml
306+ # revert the temporary changes done in Chart.yaml
297307 git checkout deployment/charts/cluster-template-crd/Chart.yaml deployment/charts/cluster-manager/Chart.yaml
298308
309+ .PHONY : helm-list
310+ helm-list :
311+ @echo " charts:"
312+ @for d in $(HELM_DIRS ) ; do \
313+ cname =$$(grep "^name:" "$$d/Chart.yaml" | cut -d " " -f 2 ) ;\
314+ echo " $$cname:" ;\
315+ echo -n " "; grep "^version" "$$d/Chart.yaml" ;\
316+ echo " gitTagPrefix: 'v'" ;\
317+ echo " outDir: '$(BUILD_DIR ) '" ;\
318+ done
319+
299320.PHONY : helm-push
300321helm-push : # # Push helm charts.
301322 helm push $(BUILD_DIR ) /cluster-template-crd-${HELM_VERSION} .tgz oci://$(REGISTRY ) /$(REGISTRY_NO_AUTH ) /$(REPOSITORY ) /charts
@@ -424,10 +445,7 @@ golint: golangci-lint ## Lint Go files.
424445helmlint : # # Lint Helm charts.
425446 helm lint ./deployment/charts/*
426447
427- EXCLUDE_DIRS ="^\.\/(venv-env|vendor)$\"
428- INCLUDE_FILES ="^.+\.(yaml|yml)$\"
429- YAML_FILES := $(shell find . -regextype posix-extended -type d -regex ${EXCLUDE_DIRS} -prune -o -type f -regex ${INCLUDE_FILES} -print)
430-
448+ YAML_FILES := $(shell find . -type f \( -name '* .yaml' -o -name '* .yml' \) -print )
431449.PHONY : yamllint
432450yamllint : $(VENV_NAME ) # # Lint YAML files.
433451 . ./$< /bin/activate; set -u; \
@@ -555,19 +573,19 @@ update-cm-version: ## Update Cluster Manager version
555573 sed -i " s/^appVersion:.*/appVersion: $$ {new_version}/" deployment/charts/cluster-manager/Chart.yaml; \
556574 sed -i " s/^version:.*/version: $$ {new_version}/" deployment/charts/cluster-template-crd/Chart.yaml; \
557575 sed -i " s/^appVersion:.*/appVersion: $$ {new_version}/" deployment/charts/cluster-template-crd/Chart.yaml;
558-
576+
559577
560578.PHONY : update-ct-version
561579update-ct-version : # # Update Cluster Template version
562580 @echo " Current version: $( shell jq -r ' .version' default-cluster-templates/baseline.json) "
563581 @read -p " Enter new version: " new_version; \
564582 sed -i " s/^ \" version\" :.*/ \" version\" : \" $$ {new_version}\" ,/" default-cluster-templates/baseline.json; \
565583 sed -i " s/^ \" version\" :.*/ \" version\" : \" $$ {new_version}\" ,/" default-cluster-templates/privileged.json; \
566- sed -i " s/^ \" version\" :.*/ \" version\" : \" $$ {new_version}\" ,/" default-cluster-templates/restricted.json
584+ sed -i " s/^ \" version\" :.*/ \" version\" : \" $$ {new_version}\" ,/" default-cluster-templates/restricted.json
567585
568586.PHONY : update-api-version
569587update-api-version : # # Update API version
570588 @echo " Current version: $( shell grep ' ^ version:' api/openapi/openapi.yaml | awk ' {print $$2}' ) "
571589 @read -p " Enter new version: " new_version; \
572590 sed -i " s/^ version:.*/ version: $$ {new_version}/" api/openapi/openapi.yaml
573- make generate-api
591+ make generate-api
0 commit comments