From e7d1d9f353ed38605c1cb7b91bf94c23f028cb86 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Mon, 11 Oct 2021 15:43:42 +0200 Subject: [PATCH] Fix up mixin tests Use new Go install format, cleanup working dir setup. Signed-off-by: Ben Kochie --- .circleci/config.yml | 23 ++++++++--------------- docs/node-mixin/Makefile | 4 ++++ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d3fc16575a..c31a6a82c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,21 +35,14 @@ jobs: executor: golang steps: - checkout - - run: - command: go install -mod=readonly github.com/google/go-jsonnet/cmd/jsonnet github.com/google/go-jsonnet/cmd/jsonnetfmt github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb github.com/prometheus/prometheus/cmd/promtool - working_directory: ~/project/docs/node-mixin - - run: - command: make clean - working_directory: ~/project/docs/node-mixin - - run: - command: jb install - working_directory: ~/project/docs/node-mixin - - run: - command: make - working_directory: ~/project/docs/node-mixin - - run: - command: git diff --exit-code - working_directory: ~/project/docs/node-mixin + - run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest + - run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest + - run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest + - run: make promtool + - run: make -C docs/node-mixin clean + - run: make -C docs/node-mixin jb_install + - run: make -C docs/node-mixin + - run: git diff --exit-code build: machine: diff --git a/docs/node-mixin/Makefile b/docs/node-mixin/Makefile index 012a4b5006..d04b37d009 100644 --- a/docs/node-mixin/Makefile +++ b/docs/node-mixin/Makefile @@ -24,5 +24,9 @@ lint: node_alerts.yaml node_rules.yaml promtool check rules node_alerts.yaml node_rules.yaml +.PHONY: jb_install +jb_install: + jb install + clean: rm -rf dashboards_out node_alerts.yaml node_rules.yaml