node_exporter/.circleci/config.yml

141 lines
3.7 KiB
YAML
Raw Normal View History

2018-03-08 11:43:49 +00:00
---
version: 2.1
orbs:
prometheus: prometheus/prometheus@0.16.0
executors:
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
# should also be updated.
golang:
2018-03-08 11:43:49 +00:00
docker:
- image: cimg/go:1.18
arm:
machine:
image: ubuntu-2004:current
resource_class: arm.medium
jobs:
test:
executor: golang
2018-03-08 11:43:49 +00:00
steps:
- prometheus/setup_environment
- run: go mod download
- run: make
- prometheus/store_artifact:
file: node_exporter
test-arm:
executor: arm
steps:
- checkout
- run: uname -a
- run: make test-e2e
codespell:
docker:
- image: circleci/python
steps:
- checkout
- run: sudo pip install codespell
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -L uint,packages\',uptodate
test_mixins:
executor: golang
steps:
- checkout
- 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
2018-03-08 11:43:49 +00:00
build:
machine:
Release 1.1.0 * Update Build - Update CircleCI orb. - Update CIrcleCI Machine image. - Use golang-builder 1.15. * Update Go modules. * Fixup fixtures for XFS bug. NOTE: We have improved some of the flag naming conventions (PR #1743). The old names are deprecated and will be removed in 2.0. They will continue to work for backwards compatibility. * [CHANGE] Improve filter flag names #1743 * [CHANGE] Add btrfs and powersupplyclass to list of exporters enabled by default #1897 * [FEATURE] Add fibre channel collector #1786 * [FEATURE] Expose cpu bugs and flags as info metrics. #1788 * [FEATURE] Add network_route collector #1811 * [FEATURE] Add zoneinfo collector #1922 * [ENHANCEMENT] Add more InfiniBand counters #1694 * [ENHANCEMENT] Add flag to aggr ipvs metrics to avoid high cardinality metrics #1709 * [ENHANCEMENT] Adding backlog/current queue length to qdisc collector #1732 * [ENHANCEMENT] Include TCP OutRsts in netstat metrics #1733 * [ENHANCEMENT] Add pool size to entropy collector #1753 * [ENHANCEMENT] Remove CGO dependencies for OpenBSD amd64 #1774 * [ENHANCEMENT] bcache: add writeback_rate_debug stats #1658 * [ENHANCEMENT] Add check state for mdadm arrays via node_md_state metric #1810 * [ENHANCEMENT] Expose XFS inode statistics #1870 * [ENHANCEMENT] Expose zfs zpool state #1878 * [ENHANCEMENT] Added an ability to pass collector.supervisord.url via SUPERVISORD_URL environment variable #1947 * [BUGFIX] filesystem_freebsd: Fix label values #1728 * [BUGFIX] Fix various procfs parsing errors #1735 * [BUGFIX] Handle no data from powersupplyclass #1747 * [BUGFIX] udp_queues_linux.go: change upd to udp in two error strings #1769 * [BUGFIX] Fix node_scrape_collector_success behaviour #1816 * [BUGFIX] Fix NodeRAIDDegraded to not use a string rule expressions #1827 * [BUGFIX] Fix node_md_disks state label from fail to failed #1862 * [BUGFIX] Handle EPERM for syscall in timex collector #1938 * [BUGFIX] bcache: fix typo in a metric name #1943 * [BUGFIX] Fix XFS read/write stats (https://github.com/prometheus/procfs/pull/343) Signed-off-by: Ben Kochie <superq@gmail.com>
2021-02-05 15:06:57 +00:00
image: ubuntu-2004:202101-01
parallelism: 3
2018-03-08 11:43:49 +00:00
steps:
- prometheus/setup_environment
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- persist_to_workspace:
root: .
paths:
- .build
- store_artifacts:
path: .build
destination: /build
test_docker:
machine:
image: ubuntu-2204:2022.04.2
environment:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
REPO_PATH: github.com/prometheus/node_exporter
steps:
- prometheus/setup_environment
- attach_workspace:
at: .
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
- run: docker images
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make test-docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make test-docker
fi
2018-03-08 11:43:49 +00:00
workflows:
version: 2
node_exporter:
jobs:
- test:
filters:
tags:
only: /.*/
- test-arm:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- codespell:
filters:
tags:
only: /.*/
- test_docker:
requires:
- test
- build
filters:
tags:
only: /.*/
- test_mixins:
filters:
tags:
only: /.*/
- prometheus/publish_master:
context: org-context
requires:
- test
- build
filters:
branches:
only: master
- prometheus/publish_release:
context: org-context
requires:
- test
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/