Skip to content

Commit

Permalink
Separate all the comments in respective buckets for better readability
Browse files Browse the repository at this point in the history
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
  • Loading branch information
vishnoianil committed Feb 12, 2025
1 parent ca9284e commit cbe6cd4
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefiles/containers-base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ TARGET_IMAGE_ARCH?=amd64
CONTAINER_ENGINE?=docker

#################### VALIDATION FUNCTIONS ####################
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

validate-container-engine:
ifeq ($(CONTAINER_ENGINE),docker)
Expand All @@ -27,6 +30,8 @@ endif

################## BUILD SOURCE CONTAINERS ##################

##@ Build Images - Helper commands for building relevant container images

ui-image: validate-container-engine src/Containerfile ## Build container image for the InstructLab UI
$(ECHO_PREFIX) printf " %-12s src/Containerfile\n" "[$(CONTAINER_ENGINE)]"
$(CMD_PREFIX) $(CONTAINER_ENGINE) build -f src/Containerfile -t quay.io/instructlab-ui/ui:$(TAG) .
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/deployment/kind/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
# ║ KIND Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### VARIABLE DEFINITIONS ####################

ILAB_KUBE_CONTEXT?=kind-instructlab-ui
ILAB_KUBE_NAMESPACE?=instructlab
ILAB_KUBE_CLUSTER_NAME?=instructlab-ui

##@ Kind Deployment - Helper commands for deploying UI stack in Kind cluster

#################### VALIDATION FUNCTIONS ####################

.PHONY: check-kind
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/deployment/openshift/prod/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
# ║ Production Openshift Deployment Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### VARIABLE DEFINITIONS ####################

SEALED_SECRETS_CONTROLLER_NAMESPACE=kube-system
SEALED_SECRETS_CONTROLLER_NAME=sealed-secrets-controller

##@ Openshift Production Deployment - Helper commands for deploying UI stack in Openshift production cluster

#################### DEPENDENCY FUNCTIONS ####################

.PHONY: check-kubeseal
Expand Down
5 changes: 5 additions & 0 deletions Makefiles/deployment/openshift/qa/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# ╔══════════════════════════════════════════════════════════╗
# ║ QA Openshift Deployment Targets ║
# ╚══════════════════════════════════════════════════════════╝
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### DEPLOYMENT FUNCTIONS ####################

##@ Openshift Production Deployment - Helper commands for deploying UI stack in Openshift production cluster

.PHONY: deploy-qa-openshift
deploy-qa-openshift: ## Deploy QA stack of the InstructLab UI on OpenShift
$(CMD_PREFIX) if [ ! -f $(REPO_ROOT)/.env ]; then \
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/devcontainer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
# ║ Devcontainer Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### DEPENDENCY FUNCTIONS ####################

DEVCONTAINER_BINARY_EXISTS ?= $(shell command -v devcontainer)

##@ Devcontainer Deployment - Helper commands for deploying UI stack in dev container

.PHONY: check-dev-container-installed
check-dev-container-installed: ## Check the devcontainer binary is in $PATH
@if [ -z "${DEVCONTAINER_BINARY_EXISTS}" ]; then \
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/linting/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
# ║ Linting Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

###################### LINTING FUNCTIONS #####################

##@ Lint commands - Commands for linting various file formats

md-lint: validate-container-engine ## Lint markdown files
$(ECHO_PREFIX) printf " "[$(CONTAINER_ENGINE)]" \n %-12s ./...\n" "[MD LINT]"
$(CMD_PREFIX) $(CONTAINER_ENGINE) run --rm -v $(CURDIR):/workdir docker.io/davidanson/markdownlint-cli2:v0.6.0 > /dev/null
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/local/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
# ║ Local Development Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### DEPENDENCY FUNCTIONS ####################

##@ Local Deployment - Helper commands for deploying UI stack locally on your machine

.PHONY: check-python3
check-python3:
$(CMD_PREFIX) if ! command -v python3 >/dev/null 2>&1; then \
Expand Down
6 changes: 6 additions & 0 deletions Makefiles/podman-compose/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
# ║ Container Runtime Compose Deployment Targets ║
# ╚══════════════════════════════════════════════════════════╝

.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

#################### DEPLOYMENT FUNCTIONS ####################

##@ Podman Deployment - Helper commands for deploying UI stack in Podman

.PHONY: validate-podman-container-engine
validate-podman-container-engine: ## Validate the podman container engine in PATH
$(CMD_PREFIX) CONTAINER_ENGINE=podman $(MAKE) validate-container-engine
Expand Down

0 comments on commit cbe6cd4

Please sign in to comment.