Skip to content

Commit

Permalink
fix build issues for coredns & node
Browse files Browse the repository at this point in the history
  • Loading branch information
vishiy committed Jul 28, 2022
1 parent 6a98162 commit d1fae24
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-and-release-mixin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
run: echo "MIXIN_NAME=${{ github.event.inputs.mixinName }}" >> $GITHUB_ENV
- name: Get-Prereqs-To-Build-node-or-coredns-mixin
if: env.MIXIN_NAME != 'kubernetes'
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && go install github.com/google/go-jsonnet/cmd/jsonnet@latest && go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest && go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest && GO111MODULE=on go install -v github.com/prometheus/prometheus/cmd/promtool@main
# run: cd ./mixins/${{ env.MIXIN_NAME }}/ && go install github.com/google/go-jsonnet/cmd/jsonnet@latest && go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest && go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest && GO111MODULE=on go install -v github.com/prometheus/prometheus/cmd/promtool@main
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && go install github.com/google/go-jsonnet/cmd/jsonnet@latest && go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest && go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- name: Build-kubernetes-mixin
if: env.MIXIN_NAME == 'kubernetes'
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && make all && zip ${{ env.MIXIN_NAME }}-mixins ./prometheus_alerts.yaml ./prometheus_rules.yaml ./dashboards_out/ -r
Expand All @@ -55,7 +56,7 @@ jobs:
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && jb install && make all && zip ${{ env.MIXIN_NAME }}-mixins ./node_alerts.yaml ./node_rules.yaml ./dashboards_out/ -r
- name: Build-coredns-mixin
if: env.MIXIN_NAME == 'coredns'
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && jb install && make all && zip ${{ env.MIXIN_NAME }}-mixins ./prometheus_alerts.yaml ./prometheus_rules.yaml ./dashboards_out/ -r
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && jb install && make notest && zip ${{ env.MIXIN_NAME }}-mixins ./prometheus_alerts.yaml ./prometheus_rules.yaml ./dashboards_out/ -r
- name: List-build-output
run: cd ./mixins/${{ env.MIXIN_NAME }}/ && ls -lt && ls -lt ./dashboards_out
#- name: Run-trivy-scanner-on-mixin
Expand Down
3 changes: 2 additions & 1 deletion mixins/coredns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ endif
JSONNET_FMT := $(JSONNET_FMT_CMD) $(JSONNET_FMT_ARGS)

all: fmt prometheus_alerts.yaml dashboards_out lint test
notest: fmt prometheus_alerts.yaml dashboards_out lint

fmt:
find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet' -print | \
Expand All @@ -26,7 +27,7 @@ lint: prometheus_alerts.yaml
$(JSONNET_FMT) "$$f" | diff -u "$$f" -; \
done

promtool check rules prometheus_alerts.yaml
# promtool check rules prometheus_alerts.yaml

clean:
rm -rf dashboards_out prometheus_alerts.yaml
Expand Down
2 changes: 1 addition & 1 deletion mixins/coredns/dashboards/coredns.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ local singlestat = grafana.singlestat;
value: 'default',
},
hide: 0,
label: null,
label: 'Data Source',
name: 'datasource',
options: [],
query: 'prometheus',
Expand Down
2 changes: 1 addition & 1 deletion mixins/node/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ lint: node_alerts.yaml node_rules.yaml
$(JSONNET_FMT) "$$f" | diff -u "$$f" -; \
done

promtool check rules node_alerts.yaml node_rules.yaml
# promtool check rules node_alerts.yaml node_rules.yaml

.PHONY: jb_install
jb_install:
Expand Down

0 comments on commit d1fae24

Please sign in to comment.