chore(mock): show progress of mock steps, add most recent Alertmanager releases

This commit is contained in:
Łukasz Mierzwa
2018-07-19 22:49:49 +02:00
parent 06c2706e24
commit 2ffc926cf8

View File

@@ -3,15 +3,15 @@ DOCKER_IMAGE := prom/alertmanager
DOCKER_ARGS := --name $(DOCKER_NAME) --rm -d -p 9093:9093 -v $(CURDIR)/alertmanager.yml:/etc/alertmanager/config.yml
# list of Alertmanager versions to generate mock files for
VERSIONS := 0.4.0 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.6.2 0.7.0 0.7.1 0.8.0 0.9.0 0.9.1 0.10.0 0.11.0 0.12.0 0.13.0 0.14.0
VERSIONS := 0.4.0 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.6.2 0.7.0 0.7.1 0.8.0 0.9.0 0.9.1 0.10.0 0.11.0 0.12.0 0.13.0 0.14.0 0.15.0 0.15.1
%/.ok: livemock.py
$(eval VERSION := $(word 1, $(subst /, ,$@)))
@echo "Generating mock files for Alertmanager $(VERSION)"
@docker pull $(DOCKER_IMAGE):v$(VERSION) > /dev/null
docker pull $(DOCKER_IMAGE):v$(VERSION)
@docker rm -f $(DOCKER_NAME) > /dev/null 2>&1 || true
@echo "Starting Alertmanager"
@docker run $(DOCKER_ARGS) $(DOCKER_IMAGE):v$(VERSION)
docker run $(DOCKER_ARGS) $(DOCKER_IMAGE):v$(VERSION)
@sleep 15
@echo "Sending mock alerts and silences"
@python livemock.py