Skip to content

Commit

Permalink
Rename jsonnet dir, remove jsonnet/vendor
Browse files Browse the repository at this point in the history
Signed-off-by: Kemal Akkoyun <[email protected]>
  • Loading branch information
kakkoyun committed Nov 26, 2019
1 parent a8538a6 commit f0c85d4
Show file tree
Hide file tree
Showing 55 changed files with 12 additions and 1,698 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/prometheus
/thanos
/vendor/
/mixin/vendor/

# Ignore minikube setup working dirs.
kube/bin
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,21 @@ mixin-generate-in-container:
.PHONY: examples
examples: examples/alerts/alerts.yaml examples/alerts/rules.yaml examples/dashboards

examples/dashboards: $(JSONNET) jsonnet/thanos-mixin/mixin.libsonnet jsonnet/thanos-mixin/config.libsonnet jsonnet/thanos-mixin/dashboards/*
rm -rf examples/dashboards/*.json
examples/dashboards: $(JSONNET) mixin/thanos-mixin/mixin.libsonnet mixin/thanos-mixin/config.libsonnet mixin/thanos-mixin/dashboards/*
-rm -rf examples/dashboards/*.json
-mkdir -p examples/dashboards/
$(JSONNET) -J jsonnet/vendor -m examples/dashboards jsonnet/thanos-mixin/dashboards.jsonnet
$(JSONNET) -J mixin/vendor -m examples/dashboards mixin/thanos-mixin/dashboards.jsonnet

examples/alerts/alerts.yaml: $(JSONNET) $(GOJSONTOYAML) jsonnet/thanos-mixin/mixin.libsonnet jsonnet/thanos-mixin/config.libsonnet jsonnet/thanos-mixin/alerts/*
$(JSONNET) jsonnet/thanos-mixin/alerts.jsonnet | $(GOJSONTOYAML) > $@
examples/alerts/alerts.yaml: $(JSONNET) $(GOJSONTOYAML) mixin/thanos-mixin/mixin.libsonnet mixin/thanos-mixin/config.libsonnet mixin/thanos-mixin/alerts/*
$(JSONNET) mixin/thanos-mixin/alerts.jsonnet | $(GOJSONTOYAML) > $@

examples/alerts/rules.yaml: $(JSONNET) $(GOJSONTOYAML) jsonnet/thanos-mixin/mixin.libsonnet jsonnet/thanos-mixin/config.libsonnet jsonnet/thanos-mixin/rules/*
$(JSONNET) jsonnet/thanos-mixin/rules.jsonnet | $(GOJSONTOYAML) > $@
examples/alerts/rules.yaml: $(JSONNET) $(GOJSONTOYAML) mixin/thanos-mixin/mixin.libsonnet mixin/thanos-mixin/config.libsonnet mixin/thanos-mixin/rules/*
$(JSONNET) mixin/thanos-mixin/rules.jsonnet | $(GOJSONTOYAML) > $@

.PHONY: jsonnet-vendor
jsonnet-vendor: $(JSONNET_BUNDLER) jsonnetfile.json jsonnetfile.lock.json
rm -rf jsonnet/vendor
$(JSONNET_BUNDLER) install --jsonnetpkg-home="jsonnet/vendor"
rm -rf mixin/vendor
$(JSONNET_BUNDLER) install --jsonnetpkg-home="mixin/vendor"

JSONNET_FMT := jsonnetfmt -n 2 --max-blank-lines 2 --string-style s --comment-style s

Expand Down
Loading

0 comments on commit f0c85d4

Please sign in to comment.