cgroup_exporter/.circleci/config.yml

81 lines
1.7 KiB
YAML
Raw Normal View History

2020-02-12 16:07:45 +00:00
---
version: 2.1
orbs:
2022-02-25 19:49:49 +00:00
prometheus: prometheus/prometheus@0.15.0
codecov: codecov/codecov@3.2.2
2020-02-12 16:07:45 +00:00
executors:
# Whenever the Go version is updated here, .promu.yml should
# also be updated.
golang:
docker:
2021-04-23 13:52:06 +00:00
- image: circleci/golang:1.16
2020-02-12 16:07:45 +00:00
jobs:
test:
executor: golang
steps:
- prometheus/setup_environment
- run: make
2020-02-20 19:29:26 +00:00
- run: make coverage
- codecov/upload:
file: coverage.txt
2020-02-12 16:07:45 +00:00
- prometheus/store_artifact:
file: cgroup_exporter
build:
machine:
2022-02-25 19:35:53 +00:00
image: ubuntu-2004:202201-02
2020-02-12 16:07:45 +00:00
steps:
- checkout
- run: make promu
- run: promu crossbuild -v
- persist_to_workspace:
root: .
paths:
- .build
- store_artifacts:
path: .build
destination: /build
- run:
command: |
if [ -n "$CIRCLE_TAG" ]; then
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
else
make docker
fi
workflows:
version: 2
cgroup_exporter:
jobs:
- test:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
2021-04-23 17:03:25 +00:00
- prometheus/publish_master:
2020-02-12 16:07:45 +00:00
context: org-context
2021-04-23 17:03:25 +00:00
docker_hub_organization: treydock
quay_io_organization: treydock
2020-02-12 16:07:45 +00:00
requires:
- test
- build
filters:
branches:
only: master
2021-04-23 17:03:25 +00:00
- prometheus/publish_release:
2020-02-12 16:07:45 +00:00
context: org-context
2021-04-23 17:03:25 +00:00
docker_hub_organization: treydock
quay_io_organization: treydock
2020-02-12 16:07:45 +00:00
requires:
- test
- build
filters:
tags:
only: /^v([0-9]).*/
branches:
ignore: /.*/