Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# =============
# This file is automatically generated from the templates in stackabletech/operator-templating
# DON'T MANUALLY EDIT THIS FILE
# =============

.PHONY: docker chart-lint compile-chart

TAG := $(shell git rev-parse --short HEAD)

VERSION := $(shell cargo metadata --format-version 1 | jq '.packages[] | select(.name=="stackable-hdfs-operator") | .version')

docker:
docker build --force-rm -t "docker.stackable.tech/stackable/hdfs-operator:${VERSION}" -t "docker.stackable.tech/stackable/hdfs-operator:latest" -f docker/Dockerfile .
echo "${NEXUS_PASSWORD}" | docker login --username github --password-stdin docker.stackable.tech
docker push --all-tags docker.stackable.tech/stackable/hdfs-operator

## Chart related targets
compile-chart: version crds config

chart-clean:
rm -rf deploy/helm/hdfs-operator/configs
rm -rf deploy/helm/hdfs-operator/templates/crds.yaml

version:
yq eval -i '.version = ${VERSION} | .appVersion = ${VERSION}' deploy/helm/hdfs-operator/Chart.yaml


config: deploy/helm/hdfs-operator/configs

deploy/helm/hdfs-operator/configs:
cp -r deploy/config-spec deploy/helm/hdfs-operator/configs

crds: deploy/helm/hdfs-operator/crds/crds.yaml

deploy/helm/hdfs-operator/crds/crds.yaml:
mkdir -p deploy/helm/hdfs-operator/crds
cat deploy/crd/*.yaml | yq e '.metadata.annotations["helm.sh/resource-policy"]="keep"' - > ${@}

chart-lint: compile-chart
docker run -it -v $(shell pwd):/build/helm-charts -w /build/helm-charts quay.io/helmpack/chart-testing:v3.4.0 ct lint --config deploy/helm/chart_testing.yaml