mirror of
https://github.com/kubereboot/kured.git
synced 2026-02-14 17:39:49 +00:00
* feat: sentinel-command without nsenter by default Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: no readonly mount Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: mount at different folder Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * feat: add signal-reboot Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * feat: make signal configurable and add tests Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * build: rename job Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * cleanup: linter Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * build: also adjust signal manifest Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * test: add e2e-tests Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: small code restructure Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> * fix: adjust version-range Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de> --------- Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
55 lines
1.5 KiB
Makefile
55 lines
1.5 KiB
Makefile
.DEFAULT: all
|
|
.PHONY: all clean image minikube-publish manifest test kured-all
|
|
|
|
TEMPDIR=./.tmp
|
|
GORELEASER_CMD=$(TEMPDIR)/goreleaser
|
|
DH_ORG=kubereboot
|
|
VERSION=$(shell git rev-parse --short HEAD)
|
|
SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
|
|
|
|
all: image
|
|
|
|
$(TEMPDIR):
|
|
mkdir -p $(TEMPDIR)
|
|
|
|
.PHONY: bootstrap-tools
|
|
bootstrap-tools: $(TEMPDIR)
|
|
VERSION=v1.19.2 TMPDIR=.tmp bash .github/scripts/goreleaser-install.sh
|
|
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b .tmp v0.86.1
|
|
curl -sSfL https://github.com/sigstore/cosign/releases/download/v2.1.1/cosign-linux-amd64 -o .tmp/cosign
|
|
chmod +x .tmp/goreleaser .tmp/cosign .tmp/syft
|
|
|
|
clean:
|
|
rm -rf ./dist
|
|
|
|
kured:
|
|
$(GORELEASER_CMD) build --clean --single-target --snapshot
|
|
|
|
kured-all:
|
|
$(GORELEASER_CMD) build --clean --snapshot
|
|
|
|
kured-release-tag:
|
|
$(GORELEASER_CMD) release --clean
|
|
|
|
kured-release-snapshot:
|
|
$(GORELEASER_CMD) release --clean --snapshot
|
|
|
|
image: kured
|
|
$(SUDO) docker buildx build --load -t ghcr.io/$(DH_ORG)/kured:$(VERSION) .
|
|
|
|
minikube-publish: image
|
|
$(SUDO) docker save ghcr.io/$(DH_ORG)/kured | (eval $$(minikube docker-env) && docker load)
|
|
|
|
manifest:
|
|
sed -i "s#image: ghcr.io/.*kured.*#image: ghcr.io/$(DH_ORG)/kured:$(VERSION)#g" kured-ds.yaml
|
|
sed -i "s#image: ghcr.io/.*kured.*#image: ghcr.io/$(DH_ORG)/kured:$(VERSION)#g" kured-ds-signal.yaml
|
|
echo "Please generate combined manifest if necessary"
|
|
|
|
test:
|
|
echo "Running go tests"
|
|
go test ./...
|
|
echo "Running golint on pkg"
|
|
golint ./pkg/...
|
|
echo "Running golint on cmd"
|
|
golint ./cmd/...
|