| 
									
										
										
										
											2018-03-08 03:43:49 -08:00
										 |  |  | ---
 | 
					
						
							| 
									
										
										
										
											2018-11-29 03:06:34 -08:00
										 |  |  | version: 2.1
 | 
					
						
							| 
									
										
										
										
											2019-07-02 09:40:25 -07:00
										 |  |  | orbs:
 | 
					
						
							| 
									
										
										
										
											2023-03-07 08:47:48 -08:00
										 |  |  |   prometheus: prometheus/prometheus@0.17.1
 | 
					
						
							| 
									
										
										
										
											2018-11-30 05:01:20 -08:00
										 |  |  | executors:
 | 
					
						
							| 
									
										
										
										
											2020-05-03 12:48:28 -07:00
										 |  |  |   # Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
 | 
					
						
							|  |  |  |   # should also be updated.
 | 
					
						
							| 
									
										
										
										
											2018-11-30 05:01:20 -08:00
										 |  |  |   golang:
 | 
					
						
							| 
									
										
										
										
											2018-03-08 03:43:49 -08:00
										 |  |  |     docker:
 | 
					
						
							| 
									
										
										
										
											2024-09-11 00:17:14 -07:00
										 |  |  |       - image: cimg/go:1.23
 | 
					
						
							| 
									
										
										
										
											2022-06-26 00:41:21 -07:00
										 |  |  |   arm:
 | 
					
						
							| 
									
										
										
										
											2024-09-11 00:17:14 -07:00
										 |  |  |     docker:
 | 
					
						
							|  |  |  |       - image: cimg/go:1.23
 | 
					
						
							| 
									
										
										
										
											2022-06-26 00:41:21 -07:00
										 |  |  |     resource_class: arm.medium
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-30 05:01:20 -08:00
										 |  |  | jobs:
 | 
					
						
							|  |  |  |   test:
 | 
					
						
							|  |  |  |     executor: golang
 | 
					
						
							| 
									
										
										
										
											2018-03-08 03:43:49 -08:00
										 |  |  |     steps:
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - prometheus/setup_environment
 | 
					
						
							|  |  |  |       - run: go mod download
 | 
					
						
							|  |  |  |       - run: make
 | 
					
						
							|  |  |  |       - prometheus/store_artifact:
 | 
					
						
							|  |  |  |           file: node_exporter
 | 
					
						
							| 
									
										
										
										
											2022-06-26 00:41:21 -07:00
										 |  |  |   test-arm:
 | 
					
						
							|  |  |  |     executor: arm
 | 
					
						
							|  |  |  |     steps:
 | 
					
						
							| 
									
										
										
										
											2024-09-11 00:17:14 -07:00
										 |  |  |       - prometheus/setup_environment
 | 
					
						
							| 
									
										
										
										
											2022-06-26 00:41:21 -07:00
										 |  |  |       - run: uname -a
 | 
					
						
							|  |  |  |       - run: make test-e2e
 | 
					
						
							| 
									
										
										
										
											2020-08-25 00:59:39 -07:00
										 |  |  |   test_mixins:
 | 
					
						
							|  |  |  |     executor: golang
 | 
					
						
							|  |  |  |     steps:
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - checkout
 | 
					
						
							| 
									
										
										
										
											2021-10-14 02:06:01 -07:00
										 |  |  |       - 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 03:43:49 -08:00
										 |  |  |   build:
 | 
					
						
							| 
									
										
										
										
											2019-04-15 08:36:25 -07:00
										 |  |  |     machine:
 | 
					
						
							| 
									
										
										
										
											2023-09-09 06:44:48 -07:00
										 |  |  |       image: ubuntu-2204:current
 | 
					
						
							| 
									
										
										
										
											2021-03-18 03:42:29 -07:00
										 |  |  |     parallelism: 3
 | 
					
						
							| 
									
										
										
										
											2018-03-08 03:43:49 -08:00
										 |  |  |     steps:
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - prometheus/setup_environment
 | 
					
						
							| 
									
										
										
										
											2023-11-12 15:30:06 -08:00
										 |  |  |       - run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - 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
 | 
					
						
							| 
									
										
										
										
											2024-05-02 11:13:10 -07:00
										 |  |  |       # sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
 | 
					
						
							|  |  |  |       - run:
 | 
					
						
							|  |  |  |           command: |
 | 
					
						
							|  |  |  |             if [[ -f "$(pwd)/.build/darwin-arm64/node_exporter" ]]; then
 | 
					
						
							|  |  |  |                 promu codesign "$(pwd)/.build/darwin-arm64/node_exporter"
 | 
					
						
							|  |  |  |             fi
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
 | 
					
						
							|  |  |  |                 promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"                
 | 
					
						
							|  |  |  |             fi
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - persist_to_workspace:
 | 
					
						
							|  |  |  |           root: .
 | 
					
						
							|  |  |  |           paths:
 | 
					
						
							|  |  |  |             - .build
 | 
					
						
							|  |  |  |       - store_artifacts:
 | 
					
						
							|  |  |  |           path: .build
 | 
					
						
							|  |  |  |           destination: /build
 | 
					
						
							| 
									
										
										
										
											2021-03-18 03:42:29 -07:00
										 |  |  |   test_docker:
 | 
					
						
							|  |  |  |     machine:
 | 
					
						
							| 
									
										
										
										
											2023-09-09 06:44:48 -07:00
										 |  |  |       image: ubuntu-2204:current
 | 
					
						
							| 
									
										
										
										
											2021-03-18 03:42:29 -07:00
										 |  |  |     environment:
 | 
					
						
							| 
									
										
										
										
											2024-09-11 00:17:14 -07:00
										 |  |  |       DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.23-base
 | 
					
						
							| 
									
										
										
										
											2021-03-18 03:42:29 -07:00
										 |  |  |       REPO_PATH: github.com/prometheus/node_exporter
 | 
					
						
							|  |  |  |     steps:
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - 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 03:43:49 -08:00
										 |  |  | workflows:
 | 
					
						
							|  |  |  |   version: 2
 | 
					
						
							|  |  |  |   node_exporter:
 | 
					
						
							|  |  |  |     jobs:
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - test:
 | 
					
						
							|  |  |  |           filters:
 | 
					
						
							|  |  |  |             tags:
 | 
					
						
							|  |  |  |               only: /.*/
 | 
					
						
							| 
									
										
										
										
											2022-06-26 00:41:21 -07:00
										 |  |  |       - test-arm:
 | 
					
						
							|  |  |  |           filters:
 | 
					
						
							|  |  |  |             tags:
 | 
					
						
							|  |  |  |               only: /.*/
 | 
					
						
							| 
									
										
										
										
											2021-09-29 11:12:14 -07:00
										 |  |  |       - build:
 | 
					
						
							|  |  |  |           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: /.*/
 |