Skip to content

Commit

Permalink
make: Introduce install/kubernetes/Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: sadath-12 <[email protected]>
  • Loading branch information
sadath-12 authored and lambdanis committed Jan 8, 2024
1 parent 8802fd6 commit 0963310
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ assignees: ''

git checkout -b pr/prepare-$RELEASE
./contrib/update-helm-chart.sh $RELEASE
./install/kubernetes/test.sh
make -C install/kubernetes
git add install/kubernetes/tetragon/
# update hugo version
sed -i "s/^version =.*/version = \"${RELEASE}\"/" docs/hugo.toml
Expand Down
4 changes: 2 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"^make codegen$",
"^make generate$",
"^make vendor$",
"^install/kubernetes/test.sh$",
"^make -C install/kubernetes$",
"^go mod vendor$",
"^install-tool golang \\$\\(grep -oP '\\^go \\\\K\\.\\+' go\\.mod\\)$"
],
Expand Down Expand Up @@ -240,7 +240,7 @@
],
// lint and generate files for helm chart
"postUpgradeTasks": {
"commands": ["install/kubernetes/test.sh"],
"commands": ["make -C install/kubernetes"],
"fileFilters": ["**/**"],
"executionMode": "branch"
}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint-helm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run install/kubernetes/test.sh
- name: Run install/kubernetes
run: |
install/kubernetes/test.sh
make -C install/kubernetes
- name: Validate generated files
run: |
test -z "$(git status --porcelain)"
if [ $? != 0 ]; then
git status --porcelain
echo "Please run 'install/kubernetes/test.sh' and submit your changes."; exit 1
echo "Please run 'make -C install/kubernetes' and submit your changes."; exit 1
fi
19 changes: 19 additions & 0 deletions install/kubernetes/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Variables
SCRIPT_DIR := $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
TETRAGON_CHART := $(SCRIPT_DIR)/tetragon
HELM ?= docker run --rm -v $(TETRAGON_CHART):/apps alpine/helm:3.3.4

# Targets
.PHONY: all lint docs
all: deps lint docs

deps:
$(HELM) dependency update .

lint:
$(HELM) lint . --with-subcharts
$(HELM) template tetragon . | docker run --rm -i ghcr.io/yannh/kubeconform:v0.6.4-alpine@sha256:e68a0b638c6e9b76f1b7d58b4ec94340ef3b6601db25b2e40b29e3ac2d68e4bf --strict --schema-location default

docs:
docker run --rm -v $(TETRAGON_CHART):/helm-docs -u $$(id -u) jnorwood/helm-docs:v1.11.0@sha256:66c8f4164dec860fa5c1528239c4aa826a12485305b7b224594b1a73f7e6879a
$(SCRIPT_DIR)/export-doc.sh $(SCRIPT_DIR)/../../docs/content/en/docs/reference/helm-chart.md
18 changes: 0 additions & 18 deletions install/kubernetes/test.sh

This file was deleted.

0 comments on commit 0963310

Please sign in to comment.