Merge pull request #1823 from simonpasquier/add-mixin-to-ci
*: add mixin tests to CI
This commit is contained in:
commit
e51b508428
|
@ -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:
|
||||||
|
|
|
@ -259,7 +259,7 @@
|
||||||
},
|
},
|
||||||
annotations: {
|
annotations: {
|
||||||
summary: 'RAID Array is degraded',
|
summary: 'RAID Array is degraded',
|
||||||
description: 'RAID array '{{ $labels.device }}' on {{ $labels.instance }} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically.',
|
description: "RAID array '{{ $labels.device }}' on {{ $labels.instance }} is in degraded state due to one or more disks failures. Number of spare drives is insufficient to fix issue automatically.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
},
|
},
|
||||||
annotations: {
|
annotations: {
|
||||||
summary: 'Failed device in RAID array',
|
summary: 'Failed device in RAID array',
|
||||||
description: 'At least one device in RAID array on {{ $labels.instance }} failed. Array '{{ $labels.device }}' needs attention and possibly a disk swap.',
|
description: "At least one device in RAID array on {{ $labels.instance }} failed. Array '{{ $labels.device }}' needs attention and possibly a disk swap.",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -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