json_exporter/.circleci/config.yml
Ben Kochie 4621bca6f6
More community cleanup
* Fix up naming to be json_exporter.
* Fix more imports/paths.
* Add Go modules.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-04-17 08:45:38 +02:00

82 lines
1.6 KiB
YAML

---
version: 2.1
orbs:
prometheus: prometheus/prometheus@0.4.0
executors:
# This must match .promu.yml.
golang:
docker:
- image: circleci/golang:1.14
jobs:
test:
executor: golang
steps:
- prometheus/setup_environment
- run: make
- prometheus/store_artifact:
file: json_exporter
publish_master:
executor: golang
steps:
- prometheus/setup_build_environment
- prometheus/publish_images:
registry: docker.io
organization: prometheuscommunity
login_variable: DOCKER_LOGIN
password_variable: DOCKER_PASSWORD
publish_release:
executor: golang
steps:
- prometheus/setup_build_environment
- run: promu crossbuild tarballs
- run: promu checksum .tarballs
- run: promu release .tarballs
- store_artifacts:
path: .tarballs
destination: releases
- prometheus/publish_release_images:
registry: docker.io
organization: prometheuscommunity
login_variable: DOCKER_LOGIN
password_variable: DOCKER_PASSWORD
workflows:
version: 2
json_exporter:
jobs:
- test:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
filters:
tags:
only: /.*/
- publish_master:
context: org-context
requires:
- test
- build
filters:
branches:
only: master
- publish_release:
context: org-context
requires:
- test
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/