Skip to content

Commit

Permalink
Fix up mixin tests (prometheus#2167)
Browse files Browse the repository at this point in the history
Use new Go install format, cleanup working dir setup.

Signed-off-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
SuperQ authored and oblitorum committed Apr 9, 2024
1 parent 62dfd35 commit e3af5e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions docs/node-mixin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e3af5e6

Please sign in to comment.