*: add mixin tests to CI
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
66fb6762bf
commit
6d959e2e8c
|
@ -31,6 +31,26 @@ jobs:
|
||||||
- run: sudo pip install codespell
|
- run: sudo pip install codespell
|
||||||
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate
|
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate
|
||||||
|
|
||||||
|
test_mixins:
|
||||||
|
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
|
||||||
|
|
||||||
build:
|
build:
|
||||||
machine:
|
machine:
|
||||||
image: ubuntu-1604:201903-01
|
image: ubuntu-1604:201903-01
|
||||||
|
@ -85,6 +105,10 @@ workflows:
|
||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
only: /.*/
|
||||||
|
- test_mixins:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /.*/
|
||||||
- prometheus/publish_master:
|
- prometheus/publish_master:
|
||||||
context: org-context
|
context: org-context
|
||||||
requires:
|
requires:
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
module github.com/prometheus/node_exporter/docs/node-mixin
|
||||||
|
|
||||||
|
go 1.15
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/google/go-jsonnet v0.16.0
|
||||||
|
github.com/jsonnet-bundler/jsonnet-bundler v0.4.0
|
||||||
|
github.com/prometheus/prometheus v1.8.2-0.20200805170718-983ebb4a5133
|
||||||
|
)
|
File diff suppressed because it is too large
Load Diff
|
@ -1,34 +1,33 @@
|
||||||
{
|
{
|
||||||
"dependencies": [
|
"version": 1,
|
||||||
{
|
"dependencies": [
|
||||||
"name": "grafonnet",
|
{
|
||||||
"source": {
|
"source": {
|
||||||
"git": {
|
"git": {
|
||||||
"remote": "https://github.com/grafana/grafonnet-lib",
|
"remote": "https://github.com/grafana/grafonnet-lib.git",
|
||||||
"subdir": "grafonnet"
|
"subdir": "grafonnet"
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "master"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "grafana-builder",
|
|
||||||
"source": {
|
|
||||||
"git": {
|
|
||||||
"remote": "https://github.com/grafana/jsonnet-libs",
|
|
||||||
"subdir": "grafana-builder"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "master"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "promgrafonnet",
|
|
||||||
"source": {
|
|
||||||
"git": {
|
|
||||||
"remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin",
|
|
||||||
"subdir": "lib/promgrafonnet"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": "master"
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
"version": "master"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": {
|
||||||
|
"git": {
|
||||||
|
"remote": "https://github.com/grafana/jsonnet-libs.git",
|
||||||
|
"subdir": "grafana-builder"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "master"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": {
|
||||||
|
"git": {
|
||||||
|
"remote": "https://github.com/kubernetes-monitoring/kubernetes-mixin.git",
|
||||||
|
"subdir": "lib/promgrafonnet"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "master"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"legacyImports": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Copyright 2020 The prometheus Authors
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
//+build tools
|
||||||
|
|
||||||
|
// Package tools tracks dependencies for tools that used in the build process.
|
||||||
|
// See https://github.com/golang/go/issues/25922
|
||||||
|
package tools
|
||||||
|
|
||||||
|
import (
|
||||||
|
_ "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"
|
||||||
|
)
|
Loading…
Reference in New Issue