-
Notifications
You must be signed in to change notification settings - Fork 53
/
Makefile
41 lines (31 loc) · 1.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
SHELL=/usr/bin/env bash -o pipefail
VPATH ?= $(shell pwd):$(PATH)
export PATH := $(VPATH)
# Runtime CLI to use for running images
CONTAINER_ENGINE ?= $(shell command -v podman 2>/dev/null || echo docker)
IMG_VERSION=1.0.4
BASE_CMD=$(CONTAINER_ENGINE) run -v "$(shell pwd):/work" --rm --privileged -t quay.io/rhobs/obsctl-reloader-rules-checker:$(IMG_VERSION) -t rhtap
ifeq ($(CMD),)
CMD := ${BASE_CMD}
endif
.PHONY: all
all: check-and-test sync_pipenv lint_yamls kustomize-build
kustomize:
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
.PHONY: check-and-test
check-and-test:
$(CMD) -t rhtap -d rhobs/alerting/data_plane -y -p --tests-dir test/promql/tests/data_plane
$(CMD) -t rhtap -d rhobs/recording -y -p --tests-dir test/promql/tests/recording
.PHONY: install_pipenv
install_pipenv:
python3 -m pip install pipenv
.PHONY: sync_pipenv
sync_pipenv:
python3 -m pipenv sync --dev
.PHONY: lint_yamls
lint_yamls:
python3 -m pipenv run yamllint . && echo "lint_yamls: SUCCESS"
.PHONY: kustomize-build
kustomize-build: kustomize
# This validates that the build command passes and not its output's validity.
kustomize build config/probes/monitoring/grafana/base 1>/dev/null