Chore: Add jsonnet library for devenv dashboards (#57928)

This commit is contained in:
Todd Treece 2022-11-03 11:04:39 -04:00 committed by GitHub
parent 813ebf988d
commit e105b5a107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 1315 additions and 272 deletions

View File

@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@ -21,29 +21,35 @@ BRA := $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8
$(BRA): $(BINGO_DIR)/bra.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=bra.mod -o=$(GOBIN)/bra-v0.0.0-20200517080246-1e3013ecaff8 "github.com/unknwon/bra"
DRONE := $(GOBIN)/drone-v1.5.0
$(DRONE): $(BINGO_DIR)/drone.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
JB := $(GOBIN)/jb-v0.5.1
$(JB): $(BINGO_DIR)/jb.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/jb-v0.5.1"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=jb.mod -o=$(GOBIN)/jb-v0.5.1 "github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb"
SWAGGER := $(GOBIN)/swagger-v0.30.2
$(SWAGGER): $(BINGO_DIR)/swagger.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/swagger-v0.30.2"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/wire-v0.5.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"

View File

@ -2,6 +2,6 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
require github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
replace golang.org/x/sys => golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c
require github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8

View File

@ -3,172 +3,3 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.19
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
require (
4d63.com/gochecknoglobals v0.1.0 // indirect
github.com/Antonboom/errname v0.1.7 // indirect
github.com/Antonboom/nilnil v0.1.1 // indirect
github.com/BurntSushi/toml v1.2.0 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/ashanbrown/forbidigo v1.3.0 // indirect
github.com/ashanbrown/makezero v1.1.1 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bkielbasa/cyclop v1.2.0 // indirect
github.com/blizzy78/varnamelen v0.8.0 // indirect
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
github.com/breml/bidichk v0.2.3 // indirect
github.com/breml/errchkjson v0.3.0 // indirect
github.com/butuzov/ireturn v0.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.9 // indirect
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
github.com/curioswitch/go-reassign v0.1.2 // indirect
github.com/daixiang0/gci v0.6.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.4.3 // indirect
github.com/esimonov/ifshort v1.0.4 // indirect
github.com/ettle/strcase v0.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structtag v1.2.0 // indirect
github.com/firefart/nonamedreturns v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/go-critic/go-critic v0.6.4 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcopy v1.0.1 // indirect
github.com/go-toolsmith/astequal v1.0.2 // indirect
github.com/go-toolsmith/astfmt v1.0.0 // indirect
github.com/go-toolsmith/astp v1.0.0 // indirect
github.com/go-toolsmith/strparse v1.0.0 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
github.com/gostaticanalysis/comment v1.4.2 // indirect
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jgautheron/goconst v1.5.1 // indirect
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/julz/importas v0.1.0 // indirect
github.com/kisielk/errcheck v1.6.2 // indirect
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.6 // indirect
github.com/kyoh86/exportloopref v0.1.8 // indirect
github.com/ldez/gomoddirectives v0.2.3 // indirect
github.com/ldez/tagliatelle v0.3.1 // indirect
github.com/leonklingele/grouper v1.1.0 // indirect
github.com/lufeee/execinquery v1.2.1 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/maratori/testpackage v1.1.0 // indirect
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.2.3 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moricho/tparallel v0.2.1 // indirect
github.com/nakabonne/nestif v0.3.1 // indirect
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
github.com/nishanths/exhaustive v0.8.1 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/ryancurrah/gomodguard v1.2.4 // indirect
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
github.com/securego/gosec/v2 v2.13.1 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/sivchari/containedctx v1.0.2 // indirect
github.com/sivchari/nosnakecase v1.7.0 // indirect
github.com/sivchari/tenv v1.7.0 // indirect
github.com/sonatard/noctx v0.0.1 // indirect
github.com/sourcegraph/go-diff v0.6.1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/sylvia7788/contextcheck v1.0.6 // indirect
github.com/tdakkota/asciicheck v0.1.1 // indirect
github.com/tetafro/godot v1.4.11 // indirect
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
github.com/timonwong/logrlint v0.1.0 // indirect
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
github.com/ultraware/funlen v0.0.3 // indirect
github.com/ultraware/whitespace v0.0.5 // indirect
github.com/uudashr/gocognit v1.0.6 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.12 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
honnef.co/go/tools v0.3.3 // indirect
mvdan.cc/gofumpt v0.3.1 // indirect
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
)

5
.bingo/jb.mod Normal file
View File

@ -0,0 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.18
require github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 // cmd/jb

50
.bingo/jb.sum Normal file
View File

@ -0,0 +1,50 @@
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1 h1:eUd6EA1Qzz73Q4NLNLOrNkMb96+6NTTERbX9lqaxVwk=
github.com/jsonnet-bundler/jsonnet-bundler v0.5.1/go.mod h1:Qrdw/7mOFS2SKCOALKFfEH8gdvXJi8XZjw9g5ilpf4I=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.4/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c h1:aFV+BgZ4svzjfabn8ERpuB4JI4N6/rdy1iusx77G3oU=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.6. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.7. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@ -14,6 +14,8 @@ DRONE="${GOBIN}/drone-v1.5.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
JB="${GOBIN}/jb-v0.5.1"
SWAGGER="${GOBIN}/swagger-v0.30.2"
WIRE="${GOBIN}/wire-v0.5.0"

View File

@ -1,6 +1,7 @@
[run]
init_cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-cli"],
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
@ -11,12 +12,14 @@ watch_dirs = [
"$WORKDIR/pkg",
"$WORKDIR/public/views",
"$WORKDIR/conf",
"$WORKDIR/devenv/dev-dashboards",
]
watch_exts = [".go", ".ini", ".toml", ".template.html"]
ignore_files = [".*_gen.go"]
build_delay = 1500
cmds = [
["make", "gen-go"],
["make", "gen-jsonnet"],
["GO_BUILD_DEV=1", "make", "build-server"],
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
]

View File

@ -202,6 +202,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -342,6 +350,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -643,6 +659,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -1035,6 +1059,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -1168,6 +1200,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -1569,6 +1609,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -2204,6 +2252,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -2289,6 +2345,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -2490,6 +2554,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- ./bin/build build-backend --jobs 8 --edition enterprise ${DRONE_TAG}
depends_on:
@ -2909,6 +2982,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -3026,6 +3108,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -4154,6 +4245,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -4236,6 +4335,14 @@ steps:
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on: []
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -4426,6 +4533,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- ./bin/build build-backend --jobs 8 --edition enterprise --build-id ${DRONE_BUILD_NUMBER}
depends_on:
@ -4835,6 +4951,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -4948,6 +5073,15 @@ steps:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-cue
- commands:
- '# It is required that generated jsonnet is committed and in sync with its inputs.'
- '# The following command will fail if running code generators produces any diff
in output.'
- CODEGEN_VERIFY=1 make gen-jsonnet
depends_on:
- init-enterprise
image: grafana/build-container:1.6.3
name: verify-gen-jsonnet
- commands:
- make gen-go
depends_on:
@ -5316,6 +5450,6 @@ kind: secret
name: packages_secret_access_key
---
kind: signature
hmac: b7a812befcaa64d70ce856f290029308d9c73f3b479bd24387e698081275e084
hmac: 284ccba3c82e516df5db917eec0afde057a622394002b3a311276fe528b7a86c
...

View File

@ -73,6 +73,9 @@ gen-go: $(WIRE) gen-cue
@echo "generate go files"
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server ./pkg/cmd/grafana-cli/runner
gen-jsonnet:
go generate ./devenv/dev-dashboards
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
@echo "build go files"
$(GO) run build.go $(GO_BUILD_FLAGS) build

View File

@ -0,0 +1,12 @@
include ../../.bingo/Variables.mk
DASHBOARDS = $(shell find ./ -type f -name '*.json')
TEMPLATES = $(shell find ./ -type f -name '*.tmpl')
vendor: jsonnetfile.json jsonnetfile.lock.json
$(JB) install
gen.libsonnet: $(DASHBOARDS) $(TEMPLATES) vendor gen.go
go generate ./
main.libsonnet: gen.libsonnet

View File

@ -3,20 +3,30 @@
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"iteration": 1573479899663,
"id": 147,
"links": [],
"liveNow": false,
"panels": [
{
"alert": {
@ -24,11 +34,17 @@
"conditions": [
{
"evaluator": {
"params": [177],
"params": [
177
],
"type": "gt"
},
"query": {
"params": ["A", "5m", "now"]
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
@ -50,9 +66,18 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
@ -78,9 +103,10 @@
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.0-pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -90,6 +116,10 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenario": "random_walk",
"scenarioId": "csv_metric_values",
@ -106,9 +136,7 @@
"value": 177
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Always Alerting",
"tooltip": {
"msResolution": false,
@ -118,9 +146,7 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
@ -129,7 +155,6 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
@ -137,14 +162,11 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
"align": false
}
},
{
@ -153,14 +175,20 @@
"conditions": [
{
"evaluator": {
"params": [100],
"params": [
100
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": ["A", "5m", "now"]
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
@ -181,9 +209,18 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
@ -209,7 +246,7 @@
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
"alertThreshold": true
},
"percentage": false,
"pointradius": 5,
@ -221,6 +258,10 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenario": "random_walk",
"scenarioId": "csv_metric_values",
@ -237,9 +278,7 @@
"value": 100
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Always Pending with For",
"tooltip": {
"msResolution": false,
@ -249,9 +288,7 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
@ -260,7 +297,6 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
@ -268,21 +304,18 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
"align": false
}
},
{
"dashboardFilter": "",
"dashboardTags": [],
"datasource": null,
"folderId": null,
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"gridPos": {
"h": 20,
"w": 4,
@ -290,16 +323,15 @@
"y": 0
},
"id": 9,
"limit": 10,
"links": [],
"nameFilter": "$namefilter",
"onlyAlertsOnDashboard": false,
"options": {},
"show": "current",
"sortOrder": 1,
"stateFilter": [],
"timeFrom": null,
"timeShift": null,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A"
}
],
"title": "Alert list",
"type": "alertlist"
},
@ -309,14 +341,20 @@
"conditions": [
{
"evaluator": {
"params": [177],
"params": [
177
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": ["A", "15m", "now"]
"params": [
"A",
"15m",
"now"
]
},
"reducer": {
"params": [],
@ -337,9 +375,18 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
@ -365,9 +412,10 @@
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.0-pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -377,6 +425,10 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenario": "random_walk",
"scenarioId": "csv_metric_values",
@ -393,9 +445,7 @@
"value": 177
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Always Alerting with For",
"tooltip": {
"msResolution": false,
@ -405,9 +455,7 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
@ -416,7 +464,6 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
@ -424,14 +471,11 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
"align": false
}
},
{
@ -439,11 +483,17 @@
"conditions": [
{
"evaluator": {
"params": [60],
"params": [
60
],
"type": "gt"
},
"query": {
"params": ["A", "5m", "now"]
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
@ -463,9 +513,18 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
@ -491,9 +550,10 @@
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.0-pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -503,6 +563,10 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenario": "random_walk",
"scenarioId": "csv_metric_values",
@ -519,9 +583,7 @@
"value": 60
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Always OK",
"tooltip": {
"msResolution": false,
@ -531,9 +593,7 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
@ -548,16 +608,12 @@
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
"align": false
}
},
{
@ -565,14 +621,20 @@
"conditions": [
{
"evaluator": {
"params": [1],
"params": [
1
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": ["A", "15m", "now"]
"params": [
"A",
"15m",
"now"
]
},
"reducer": {
"params": [],
@ -593,9 +655,18 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "gdev-testdata",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
@ -621,9 +692,10 @@
"links": [],
"nullPointMode": "connected",
"options": {
"dataLinks": []
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "9.3.0-pre",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -633,6 +705,10 @@
"steppedLine": false,
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenario": "random_walk",
"scenarioId": "no_data_points",
@ -649,9 +725,7 @@
"value": 1
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "No data",
"tooltip": {
"msResolution": false,
@ -661,9 +735,7 @@
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
@ -672,7 +744,6 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
@ -680,25 +751,23 @@
"format": "short",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
"align": false
}
}
],
"revision": 2,
"schemaVersion": 21,
"schemaVersion": 37,
"style": "dark",
"tags": ["gdev", "alerting"],
"tags": [
"gdev",
"alerting"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "TestData",
"value": "TestData"
@ -736,11 +805,33 @@
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Alerting with TestData",
"uid": "7MeksYbmk",
"version": 3
}
"version": 1,
"weekStart": ""
}

View File

@ -2,5 +2,8 @@ package dev_dashboards
import "embed"
// generate gen.libsonnet
//go:generate go run gen.go
//go:embed *.json */*.json
var DevDashboardFS embed.FS

View File

@ -0,0 +1,123 @@
//go:build ignore
// +build ignore
package main
import (
"bytes"
"embed"
"fmt"
"os"
"path"
"sort"
"strings"
"text/template"
dev_dashboards "github.com/grafana/grafana/devenv/dev-dashboards"
"github.com/grafana/grafana/pkg/codegen"
)
var (
OUTPUT_PATH = "gen.libsonnet"
EXCLUDE = map[string]struct{}{
"jsonnetfile.json": {},
"jsonnetfile.lock.json": {},
"panel-library.json": {}, // TODO: remove panel-library once importing issue is fixed
}
)
//go:embed tmpl/*.tmpl
var tmplFS embed.FS
func main() {
g := newGen()
out, err := g.generate()
if err != nil {
panic(err)
}
wd := codegen.NewWriteDiffer()
wd[OUTPUT_PATH] = []byte(out)
if _, set := os.LookupEnv("CODEGEN_VERIFY"); set {
err = wd.Verify()
if err != nil {
fmt.Fprintf(os.Stderr, "generated code is not up to date:\n%s\nrun `make gen-jsonnet` to regenerate\n\n", err)
os.Exit(1)
}
} else {
err = wd.Write()
if err != nil {
fmt.Fprintf(os.Stderr, "error while writing generated code to disk:\n%s\n", err)
os.Exit(1)
}
}
}
type devDashboard struct {
Name string
Path string
}
type libjsonnetGen struct {
templates *template.Template
dashboards []devDashboard
}
func newGen() *libjsonnetGen {
tmpls := template.New("codegen")
tmpls = template.Must(tmpls.ParseFS(tmplFS, "tmpl/*.tmpl"))
return &libjsonnetGen{templates: tmpls}
}
func (g *libjsonnetGen) generate() (string, error) {
buf := new(bytes.Buffer)
if err := g.readDir("."); err != nil {
return "", err
}
sort.Slice(g.dashboards, func(i, j int) bool {
return g.dashboards[i].Name < g.dashboards[j].Name
})
vars := struct {
Dashboards []devDashboard
}{g.dashboards}
if err := g.templates.Lookup("gen.libsonnet.tmpl").Execute(buf, vars); err != nil {
return "", err
}
return buf.String(), nil
}
func (g *libjsonnetGen) readDir(dir string) error {
files, err := dev_dashboards.DevDashboardFS.ReadDir(dir)
if err != nil {
return err
}
for _, f := range files {
if _, skip := EXCLUDE[f.Name()]; skip {
continue
}
if f.IsDir() {
if err := g.readDir(path.Join(dir, f.Name())); err != nil {
return err
}
continue
}
name := strings.TrimSuffix(f.Name(), ".json")
if len(name) > 40 {
name = name[:40]
}
g.dashboards = append(g.dashboards, devDashboard{
Path: path.Join(dir, f.Name()),
Name: name,
})
}
return nil
}

View File

@ -0,0 +1,706 @@
// This file is autogenerated. DO NOT EDIT.
// Generated by gen.go
// Run `make gen-jsonnet` from repository root to regenerate.
local grafana = import "grizzly/grafana.libsonnet";
local resource = import "grizzly/resource.libsonnet";
local dashboard = grafana.dashboard;
{
folders: [grafana.folder.new('dev-dashboards', 'dev-dashboards')],
dashboards: [
dashboard.new('Repeating-Kitchen-Sink', import 'e2e-repeats/Repeating-Kitchen-Sink.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-panel-horizontally', import 'e2e-repeats/Repeating-a-panel-horizontally.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-panel-vertically', import 'e2e-repeats/Repeating-a-panel-vertically.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel-and-horizontal-repeating-panel.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel-and-vertical-repeating-panel.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-row-with-a-non-repeating-pan', import 'e2e-repeats/Repeating-a-row-with-a-non-repeating-panel.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-row-with-a-repeating-horizon', import 'e2e-repeats/Repeating-a-row-with-a-repeating-horizontal-panel.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-a-row-with-a-repeating-vertica', import 'e2e-repeats/Repeating-a-row-with-a-repeating-vertical-panel.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('Repeating-an-empty-row', import 'e2e-repeats/Repeating-an-empty-row.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('all-panels', import 'all-panels.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('auto_decimals', import 'panel-common/auto_decimals.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('bar-gauge-demo2', import 'datasource-testdata/bar-gauge-demo2.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('bar_gauge_demo', import 'panel-bargauge/bar_gauge_demo.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('barchart-autosizing', import 'panel-barchart/barchart-autosizing.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('candlestick', import 'panel-candlestick/candlestick.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('canvas-examples', import 'panel-canvas/canvas-examples.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('color_modes', import 'panel-common/color_modes.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('config-from-query', import 'transforms/config-from-query.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('demo1', import 'datasource-testdata/demo1.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('elasticsearch_compare', import 'datasource-elasticsearch/elasticsearch_compare.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('elasticsearch_v7', import 'datasource-elasticsearch/elasticsearch_v7.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('elasticsearch_v7_filebeat', import 'datasource-elasticsearch/elasticsearch_v7_filebeat.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('gauge-multi-series', import 'panel-gauge/gauge-multi-series.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('gauge_tests', import 'panel-gauge/gauge_tests.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('geomap-color-field', import 'panel-geomap/geomap-color-field.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('geomap-photo-layer', import 'panel-geomap/geomap-photo-layer.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('geomap-spatial-operations-transformer', import 'panel-geomap/geomap-spatial-operations-transformer.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('geomap-v91', import 'panel-geomap/geomap-v91.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('geomap_multi-layers', import 'panel-geomap/geomap_multi-layers.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('global-variables-and-interpolation', import 'feature-templating/global-variables-and-interpolation.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('graph-gradient-area-fills', import 'panel-graph/graph-gradient-area-fills.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('graph-shared-tooltips', import 'panel-graph/graph-shared-tooltips.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('graph-time-regions', import 'panel-graph/graph-time-regions.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('graph_tests', import 'panel-graph/graph_tests.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('graph_y_axis', import 'panel-graph/graph_y_axis.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('heatmap-calculate-log', import 'panel-heatmap/heatmap-calculate-log.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('heatmap-legacy', import 'panel-heatmap/heatmap-legacy.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('histogram_tests', import 'panel-histogram/histogram_tests.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('home', import 'home.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('influxdb-logs', import 'datasource-influxdb/influxdb-logs.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('influxdb-templated', import 'datasource-influxdb/influxdb-templated.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('join-by-field', import 'transforms/join-by-field.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('join-by-labels', import 'transforms/join-by-labels.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('lazy_loading', import 'panel-common/lazy_loading.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('linked-viz', import 'panel-common/linked-viz.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('loki_fakedata', import 'datasource-loki/loki_fakedata.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('mssql_fakedata', import 'datasource-mssql/mssql_fakedata.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('mssql_unittest', import 'datasource-mssql/mssql_unittest.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('mysql_fakedata', import 'datasource-mysql/mysql_fakedata.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('mysql_unittest', import 'datasource-mysql/mysql_unittest.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('new_features_in_v62', import 'datasource-testdata/new_features_in_v62.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('new_features_in_v74', import 'datasource-testdata/new_features_in_v74.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('new_features_in_v8', import 'datasource-testdata/new_features_in_v8.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('opentsdb', import 'datasource-opentsdb/opentsdb.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('opentsdb_v23', import 'datasource-opentsdb/opentsdb_v23.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panel-geomap', import 'panel-geomap/panel-geomap.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panel-stat-tests', import 'panel-stat/panel-stat-tests.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panel_test_piechart', import 'panel-piechart/panel_test_piechart.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panel_tests_bar_gauge', import 'panel-bargauge/panel_tests_bar_gauge.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panel_tests_bar_gauge2', import 'panel-bargauge/panel_tests_bar_gauge2.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('panels_without_title', import 'panel-common/panels_without_title.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('polystat_test', import 'panel-polystat/polystat_test.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('postgres_fakedata', import 'datasource-postgres/postgres_fakedata.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('postgres_unittest', import 'datasource-postgres/postgres_unittest.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('reuse', import 'transforms/reuse.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('rows-to-fields', import 'transforms/rows-to-fields.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('shared_queries', import 'panel-common/shared_queries.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('slow_queries_and_annotations', import 'scenarios/slow_queries_and_annotations.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('table_pagination', import 'panel-table/table_pagination.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('table_tests', import 'panel-table/table_tests.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('table_tests_new', import 'panel-table/table_tests_new.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('templating-dashboard-links-and-variables', import 'feature-templating/templating-dashboard-links-and-variables.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('templating-textbox-e2e-scenarios', import 'feature-templating/templating-textbox-e2e-scenarios.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-datalinks', import 'feature-templating/testdata-datalinks.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-nested-variables', import 'feature-templating/testdata-nested-variables.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-nested-variables-drilldown', import 'feature-templating/testdata-nested-variables-drilldown.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-repeating', import 'feature-templating/testdata-repeating.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-test-variable-output', import 'feature-templating/testdata-test-variable-output.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-variables-textbox', import 'feature-templating/testdata-variables-textbox.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata-variables-that-update-on-time-c', import 'feature-templating/testdata-variables-that-update-on-time-change.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('testdata_alerts', import 'alerting/testdata_alerts.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('text-options', import 'panel-text/text-options.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('time_zone_support', import 'scenarios/time_zone_support.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeline-demo', import 'panel-timeline/timeline-demo.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeline-modes', import 'panel-timeline/timeline-modes.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries', import 'panel-timeseries/timeseries.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-by-value-color-schemes', import 'panel-timeseries/timeseries-by-value-color-schemes.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-gradient-area', import 'panel-timeseries/timeseries-gradient-area.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-hue-gradients', import 'panel-timeseries/timeseries-hue-gradients.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-nulls', import 'panel-timeseries/timeseries-nulls.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-out-of-rage', import 'panel-timeseries/timeseries-out-of-rage.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-shared-tooltip-cursor-positio', import 'panel-timeseries/timeseries-shared-tooltip-cursor-position.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-soft-limits', import 'panel-timeseries/timeseries-soft-limits.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-stacking', import 'panel-timeseries/timeseries-stacking.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-stacking2', import 'panel-timeseries/timeseries-stacking2.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-thresholds', import 'panel-timeseries/timeseries-thresholds.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-time', import 'panel-timeseries/timeseries-time.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-y-ticks-zero-decimals', import 'panel-timeseries/timeseries-y-ticks-zero-decimals.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
dashboard.new('timeseries-yaxis-ticks', import 'panel-timeseries/timeseries-yaxis-ticks.json') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},
],
}

View File

@ -0,0 +1,15 @@
{
"version": 1,
"dependencies": [
{
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "grizzly"
}
},
"version": "master"
}
],
"legacyImports": true
}

View File

@ -0,0 +1,16 @@
{
"version": 1,
"dependencies": [
{
"source": {
"git": {
"remote": "https://github.com/grafana/jsonnet-libs.git",
"subdir": "grizzly"
}
},
"version": "49b026e4d0aa15b0fee70ae80cc1d2bb792ee14d",
"sum": "yY8w1JvVAuxB3Z62R3OxDVcSRPUKIvEWQZ2ShyD7uis="
}
],
"legacyImports": false
}

View File

@ -0,0 +1 @@
(import 'gen.libsonnet')

View File

@ -0,0 +1,20 @@
// This file is autogenerated. DO NOT EDIT.
// Generated by gen.go
// Run `make gen-jsonnet` from repository root to regenerate.
local grafana = import "grizzly/grafana.libsonnet";
local resource = import "grizzly/resource.libsonnet";
local dashboard = grafana.dashboard;
{
folders: [grafana.folder.new('dev-dashboards', 'dev-dashboards')],
dashboards: [{{range .Dashboards}}
dashboard.new('{{.Name}}', import '{{.Path}}') +
resource.addMetadata('folder', 'dev-dashboards') +
{
spec+: {
id: 0,
}
},{{end}}
],
}

View File

@ -37,6 +37,7 @@ load(
'publish_grafanacom_step',
'upload_cdn_step',
'verify_gen_cue_step',
'verify_gen_jsonnet_step',
'publish_images_step',
'publish_linux_packages_step',
'trigger_oss',
@ -205,7 +206,7 @@ def get_oss_pipelines(trigger, ver_mode):
test_backend(trigger, ver_mode),
pipeline(
name='{}-oss-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition), wire_install_step(), ] + integration_test_steps,
steps=[download_grabpl_step(), identify_runner_step(), verify_gen_cue_step(edition), verify_gen_jsonnet_step(edition), wire_install_step(), ] + integration_test_steps,
environment=environment, volumes=volumes,
)
])
@ -307,7 +308,7 @@ def get_enterprise_pipelines(trigger, ver_mode):
]
}
for step in [wire_install_step(), yarn_install_step(edition), verify_gen_cue_step(edition)]:
for step in [wire_install_step(), yarn_install_step(edition), verify_gen_cue_step(edition), verify_gen_jsonnet_step(edition)]:
step.update(deps_on_clone_enterprise_step)
init_steps.extend([step])
@ -331,7 +332,7 @@ def get_enterprise_pipelines(trigger, ver_mode):
test_backend(trigger, ver_mode, edition),
pipeline(
name='{}-enterprise-integration-tests'.format(ver_mode), edition=edition, trigger=trigger, services=services,
steps=[download_grabpl_step(), identify_runner_step(), clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode), verify_gen_cue_step(edition), wire_install_step()] + integration_test_steps + [redis_integration_tests_step(), memcached_integration_tests_step()],
steps=[download_grabpl_step(), identify_runner_step(), clone_enterprise_step(ver_mode), init_enterprise_step(ver_mode), verify_gen_cue_step(edition), verify_gen_jsonnet_step(edition), wire_install_step()] + integration_test_steps + [redis_integration_tests_step(), memcached_integration_tests_step()],
environment=environment, volumes=volumes,
),
])

View File

@ -30,6 +30,7 @@ load(
'upload_packages_step',
'upload_cdn_step',
'verify_gen_cue_step',
'verify_gen_jsonnet_step',
'test_a11y_frontend_step',
'trigger_oss',
'betterer_frontend_step',
@ -49,6 +50,7 @@ def build_e2e(trigger, ver_mode, edition):
download_grabpl_step(),
compile_build_cmd(),
verify_gen_cue_step(edition="oss"),
verify_gen_jsonnet_step(edition="oss"),
wire_install_step(),
yarn_install_step(),
]

View File

@ -3,6 +3,7 @@ load(
'identify_runner_step',
'download_grabpl_step',
'verify_gen_cue_step',
'verify_gen_jsonnet_step',
'wire_install_step',
'postgres_integration_tests_step',
'mysql_integration_tests_step',
@ -29,6 +30,7 @@ def integration_tests(trigger, ver_mode, edition):
compile_build_cmd(),
identify_runner_step(),
verify_gen_cue_step(edition="oss"),
verify_gen_jsonnet_step(edition="oss"),
wire_install_step(),
]
test_steps = [

View File

@ -6,6 +6,7 @@ load(
'test_backend_step',
'test_backend_integration_step',
'verify_gen_cue_step',
'verify_gen_jsonnet_step',
'compile_build_cmd',
'clone_enterprise_step',
'init_enterprise_step',
@ -25,6 +26,7 @@ def test_backend(trigger, ver_mode, edition="oss"):
identify_runner_step(),
compile_build_cmd(edition),
verify_gen_cue_step(edition),
verify_gen_jsonnet_step(edition),
wire_install_step(),
])
test_steps = [

View File

@ -1158,6 +1158,21 @@ def verify_gen_cue_step(edition):
],
}
def verify_gen_jsonnet_step(edition):
deps = []
if edition in ('enterprise', 'enterprise2'):
deps.extend(['init-enterprise'])
return {
'name': 'verify-gen-jsonnet',
'image': build_image,
'depends_on': deps,
'commands': [
'# It is required that generated jsonnet is committed and in sync with its inputs.',
'# The following command will fail if running code generators produces any diff in output.',
'CODEGEN_VERIFY=1 make gen-jsonnet',
],
}
def trigger_test_release():
return {
'name': 'trigger-test-release',