forked from prometheus/prometheus
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from v3io/development
dev -> master
- Loading branch information
Showing
2,270 changed files
with
454,238 additions
and
156,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,82 @@ | ||
--- | ||
version: 2.1 | ||
|
||
orbs: | ||
prometheus: prometheus/[email protected] | ||
go: circleci/[email protected] | ||
win: circleci/[email protected] | ||
|
||
executors: | ||
# Whenever the Go version is updated here, .travis.yml and .promu.yml | ||
# Whenever the Go version is updated here, .promu.yml | ||
# should also be updated. | ||
golang: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
- image: circleci/golang:1.13-node | ||
|
||
fuzzit: | ||
docker: | ||
- image: fuzzitdev/golang:1.12.7-buster | ||
|
||
jobs: | ||
test: | ||
executor: golang | ||
|
||
steps: | ||
- checkout | ||
- run: make promu | ||
- run: make check_license style unused staticcheck build check_assets | ||
- prometheus/setup_environment | ||
- go/load-cache: | ||
key: v1 | ||
- restore_cache: | ||
keys: | ||
- v1-npm-deps-{{ checksum "web/ui/react-app/yarn.lock" }} | ||
- v1-npm-deps- | ||
- run: | ||
command: | | ||
curl -s -L https://github.com/protocolbuffers/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip > /tmp/protoc.zip | ||
unzip -d /tmp /tmp/protoc.zip | ||
chmod +x /tmp/bin/protoc | ||
echo 'export PATH=/tmp/bin:$PATH' >> $BASH_ENV | ||
source $BASH_ENV | ||
make proto | ||
- run: git diff --exit-code | ||
- store_artifacts: | ||
path: prometheus | ||
destination: /build/prometheus | ||
- store_artifacts: | ||
path: promtool | ||
destination: /build/promtool | ||
- run: rm -v prometheus promtool | ||
|
||
build: | ||
machine: true | ||
|
||
steps: | ||
- checkout | ||
- run: make promu | ||
- run: promu crossbuild -v | ||
- persist_to_workspace: | ||
root: . | ||
command: make | ||
environment: | ||
# Run garbage collection more aggressively to avoid getting OOMed during the lint phase. | ||
GOGC: "20" | ||
# 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" | ||
- prometheus/check_proto | ||
- prometheus/store_artifact: | ||
file: prometheus | ||
- prometheus/store_artifact: | ||
file: promtool | ||
- go/save-cache: | ||
key: v1 | ||
- save_cache: | ||
key: v1-npm-deps-{{ checksum "web/ui/react-app/yarn.lock" }} | ||
paths: | ||
- .build | ||
- store_artifacts: | ||
path: .build | ||
destination: /build | ||
|
||
docker_hub_master: | ||
executor: golang | ||
|
||
- web/ui/react-app/node_modules | ||
test_windows: | ||
executor: win/default | ||
working_directory: /go/src/github.com/prometheus/prometheus | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- attach_workspace: | ||
at: . | ||
- run: ln -s .build/linux-amd64/prometheus prometheus | ||
- run: ln -s .build/linux-amd64/promtool promtool | ||
- run: make docker | ||
- run: make docker DOCKER_REPO=quay.io/prometheus | ||
- run: docker images | ||
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
- run: make docker-publish | ||
- run: make docker-publish DOCKER_REPO=quay.io/prometheus | ||
# TSDB is where the most risk is Windows wise, so only test there for now. | ||
- run: go test ./tsdb/... | ||
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 | ||
|
||
docker_hub_release_tags: | ||
makefile_sync: | ||
executor: golang | ||
|
||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- run: mkdir -v -p ${HOME}/bin | ||
- run: curl -L 'https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2' | tar xvjf - --strip-components 3 -C ${HOME}/bin | ||
- run: echo 'export PATH=${HOME}/bin:${PATH}' >> ${BASH_ENV} | ||
- attach_workspace: | ||
at: . | ||
- run: make promu | ||
- run: promu crossbuild tarballs | ||
- run: promu checksum .tarballs | ||
- run: promu release .tarballs | ||
- store_artifacts: | ||
path: .tarballs | ||
destination: releases | ||
- run: ln -s .build/linux-amd64/prometheus prometheus | ||
- run: ln -s .build/linux-amd64/promtool promtool | ||
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG | ||
- run: make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG DOCKER_REPO=quay.io/prometheus | ||
- run: docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- run: docker login -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
- run: | | ||
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then | ||
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" | ||
make docker-tag-latest DOCKER_IMAGE_TAG="$CIRCLE_TAG" DOCKER_REPO=quay.io/prometheus | ||
fi | ||
- run: make docker-publish | ||
- run: make docker-publish DOCKER_REPO=quay.io/prometheus | ||
- run: ./scripts/sync_makefiles.sh | ||
|
||
workflows: | ||
version: 2 | ||
|
@@ -106,18 +86,30 @@ workflows: | |
filters: | ||
tags: | ||
only: /.*/ | ||
- build: | ||
- test_windows: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- fuzzit_regression: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- docker_hub_master: | ||
- prometheus/build: | ||
name: build | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- prometheus/publish_master: | ||
context: org-context | ||
requires: | ||
- test | ||
- build | ||
filters: | ||
branches: | ||
only: master | ||
- docker_hub_release_tags: | ||
image: circleci/golang:1-node | ||
- prometheus/publish_release: | ||
context: org-context | ||
requires: | ||
- test | ||
- build | ||
|
@@ -126,3 +118,17 @@ workflows: | |
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
branches: | ||
ignore: /.*/ | ||
image: circleci/golang:1-node | ||
nightly: | ||
triggers: | ||
- schedule: | ||
cron: "0 0 * * *" | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
jobs: | ||
- makefile_sync: | ||
context: org-context | ||
- fuzzit_fuzzing: | ||
context: org-context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ data/ | |
.tarballs/ | ||
|
||
!.build/linux-amd64/ | ||
!.build/linux-armv7/ | ||
!.build/linux-arm64/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- | ||
Don't forget! | ||
- If the PR adds or changes a behaviour or fixes a bug of an exported API it would need a unit/e2e test. | ||
- Where possible use only exported APIs for tests to simplify the review and make it as close as possible to an actual library usage. | ||
- No tests are needed for internal implementation changes. | ||
- Performance improvements would need a benchmark test to prove it. | ||
- All exposed objects should have a comment. | ||
- All comments should start with a capital letter and end with a full stop. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads | ||
|
||
# Number of days of inactivity before a closed issue or pull request is locked | ||
daysUntilLock: 180 | ||
|
||
# Skip issues and pull requests created before a given timestamp. Timestamp must | ||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable | ||
skipCreatedBefore: false | ||
|
||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable | ||
exemptLabels: [] | ||
|
||
# Label to add before locking, such as `outdated`. Set to `false` to disable | ||
lockLabel: false | ||
|
||
# Comment to post before locking. Set to `false` to disable | ||
lockComment: false | ||
|
||
# Assign `resolved` as the reason for locking. Set to `false` to disable | ||
setLockReason: false | ||
|
||
# Limit to only `issues` or `pulls` | ||
only: issues | ||
|
||
# Optionally, specify configuration settings just for `issues` or `pulls` | ||
# issues: | ||
# exemptLabels: | ||
# - help-wanted | ||
# lockLabel: outdated | ||
|
||
# pulls: | ||
# daysUntilLock: 30 | ||
|
||
# Repository to extend settings from | ||
# _extends: repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
run: | ||
modules-download-mode: vendor | ||
deadline: 5m | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- errcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude: scripts/errcheck_excludes.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.