2018-04-20 22:35:53 -07:00
---
2018-10-09 05:24:36 -07:00
version : 2.1
2018-04-20 22:35:53 -07:00
2019-07-15 00:41:28 -07:00
orbs :
2020-01-13 05:54:07 -08:00
prometheus : prometheus/prometheus@0.4.0
2019-10-24 01:43:22 -07:00
go : circleci/go@0.2.0
2020-01-04 06:55:02 -08:00
win : circleci/windows@2.3.0
2019-07-15 00:41:28 -07:00
2018-10-16 00:41:45 -07:00
executors :
2019-11-25 05:59:26 -08:00
# Whenever the Go version is updated here, .promu.yml
2018-10-16 00:41:45 -07:00
# should also be updated.
golang :
2018-04-20 22:35:53 -07:00
docker :
2020-04-13 05:55:35 -07:00
- image : circleci/golang:1.14-node
2018-10-16 00:41:45 -07:00
2019-08-21 01:43:53 -07:00
fuzzit :
docker :
- image : fuzzitdev/golang:1.12.7-buster
2018-10-16 00:41:45 -07:00
jobs :
test :
executor : golang
2018-04-20 22:35:53 -07:00
steps :
2019-07-15 00:41:28 -07:00
- prometheus/setup_environment
2019-10-24 01:43:22 -07:00
- go/load-cache :
key : v1
- restore_cache :
keys :
2020-08-04 14:31:59 -07:00
- v3-npm-deps-{{ checksum "web/ui/react-app/yarn.lock" }}
- v3-npm-deps-
2019-05-03 06:11:28 -07:00
- run :
2019-07-15 02:20:08 -07:00
command : make
2019-05-03 06:11:28 -07:00
environment :
2019-09-30 08:54:55 -07:00
# Run garbage collection more aggressively to avoid getting OOMed during the lint phase.
2019-05-03 06:11:28 -07:00
GOGC : "20"
2019-07-15 02:20:08 -07:00
# By default Go uses GOMAXPROCS but a Circle CI executor has many
# cores (> 30) while the CPU and RAM resources are throttled. If we
# don't limit this to the number of allocated cores, the job is
# likely to get OOMed and killed.
GOOPTS : "-p 2"
2020-01-19 13:56:13 -08:00
GOMAXPROCS : "2"
2020-02-17 13:13:33 -08:00
- prometheus/check_proto :
2020-07-27 02:08:38 -07:00
version : "3.12.3"
2019-07-15 00:41:28 -07:00
- prometheus/store_artifact :
file : prometheus
- prometheus/store_artifact :
file : promtool
2019-10-24 01:43:22 -07:00
- go/save-cache :
key : v1
- save_cache :
2020-08-04 14:31:59 -07:00
key : v3-npm-deps-{{ checksum "web/ui/react-app/yarn.lock" }}
2019-10-24 01:43:22 -07:00
paths :
2020-08-04 14:31:59 -07:00
- /home/circleci/.cache/yarn
2020-02-24 02:50:05 -08:00
- store_test_results :
path : test-results
2020-01-04 06:55:02 -08:00
test_windows :
executor : win/default
working_directory : /go/src/github.com/prometheus/prometheus
steps :
- checkout
2020-05-31 23:45:30 -07:00
- run :
# Temporary workaround until circleci updates go.
shell : bash
command : |
choco upgrade -y golang
2020-01-20 05:17:11 -08:00
- run :
shell : bash
command : |
(cd web/ui && GOOS= GOARCH= go generate -mod=vendor)
2020-05-31 23:45:30 -07:00
go test -mod=vendor -vet=off -test.v `go list ./...|grep -Exv "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"`
2020-01-20 05:17:11 -08:00
environment :
GOGC : "20"
GOOPTS : "-p 2 -mod=vendor"
2019-08-21 01:43:53 -07:00
fuzzit_regression :
executor : fuzzit
working_directory : /go/src/github.com/prometheus/prometheus
steps :
- checkout
- setup_remote_docker
- run : ./fuzzit.sh local-regression
fuzzit_fuzzing :
executor : fuzzit
working_directory : /go/src/github.com/prometheus/prometheus
steps :
- checkout
- setup_remote_docker
- run : ./fuzzit.sh fuzzing
2018-04-20 22:35:53 -07:00
2020-06-17 07:51:32 -07:00
repo_sync :
2019-04-11 05:31:04 -07:00
executor : golang
steps :
- checkout
2020-06-17 07:51:32 -07:00
- run : ./scripts/sync_repo_files.sh
2019-04-11 05:31:04 -07:00
2018-04-20 22:35:53 -07:00
workflows :
version : 2
prometheus :
jobs :
- test :
filters :
tags :
only : /.*/
2020-01-04 06:55:02 -08:00
- test_windows :
filters :
tags :
only : /.*/
2019-08-21 01:43:53 -07:00
- fuzzit_regression :
filters :
tags :
only : /.*/
2019-07-15 00:41:28 -07:00
- prometheus/build :
name : build
2018-04-20 22:35:53 -07:00
filters :
tags :
only : /.*/
2019-07-15 00:41:28 -07:00
- prometheus/publish_master :
2019-05-29 01:02:30 -07:00
context : org-context
2018-04-20 22:35:53 -07:00
requires :
- test
- build
filters :
branches :
only : master
2019-10-18 07:08:26 -07:00
image : circleci/golang:1-node
2019-07-15 00:41:28 -07:00
- prometheus/publish_release :
2019-05-29 01:02:30 -07:00
context : org-context
2018-04-20 22:35:53 -07:00
requires :
- test
- build
filters :
tags :
only : /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches :
ignore : /.*/
2019-10-18 07:08:26 -07:00
image : circleci/golang:1-node
2019-04-11 05:31:04 -07:00
nightly :
triggers :
- schedule :
cron : "0 0 * * *"
filters :
branches :
only :
- master
jobs :
2020-06-17 07:51:32 -07:00
- repo_sync :
2019-05-29 01:02:30 -07:00
context : org-context
2019-08-21 01:43:53 -07:00
- fuzzit_fuzzing :
context : org-context