Skip to content

Commit

Permalink
Merge pull request #65 from v3io/development
Browse files Browse the repository at this point in the history
dev -> master
  • Loading branch information
Gal Topper authored Oct 5, 2020
2 parents f7b39e3 + 1581d6d commit 8a3b020
Show file tree
Hide file tree
Showing 2,270 changed files with 454,238 additions and 156,747 deletions.
168 changes: 87 additions & 81 deletions .circleci/config.yml
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
Expand All @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ data/
.tarballs/

!.build/linux-amd64/
!.build/linux-armv7/
!.build/linux-arm64/
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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.
-->
35 changes: 35 additions & 0 deletions .github/lock.yml
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

/prometheus
/promtool
/tsdb/tsdb
benchmark.txt
/data
/cmd/prometheus/data
/cmd/prometheus/debug

!/.travis.yml
!/.promu.yml
!/.golangci.yml
/documentation/examples/remote_storage/remote_storage_adapter/remote_storage_adapter
/documentation/examples/remote_storage/example_write_adapter/example_writer_adapter

npm_licenses.tar.bz2
/web/ui/static/react
/web/ui/assets_vfsdata.go

.idea/
13 changes: 13 additions & 0 deletions .golangci.yml
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
18 changes: 9 additions & 9 deletions .promu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here, .travis.yml and
# Whenever the Go version is updated here,
# .circle/config.yml should also be updated.
version: 1.11
version: 1.13
repository:
path: github.com/prometheus/prometheus
build:
Expand All @@ -10,7 +10,9 @@ build:
path: ./cmd/prometheus
- name: promtool
path: ./cmd/promtool
flags: -mod=vendor -a -tags netgo
- name: tsdb
path: ./tsdb/cmd/tsdb
flags: -mod=vendor -a -tags netgo,builtinassets
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}
Expand All @@ -24,6 +26,7 @@ tarball:
- documentation/examples/prometheus.yml
- LICENSE
- NOTICE
- npm_licenses.tar.bz2
crossbuild:
platforms:
- linux/amd64
Expand All @@ -42,13 +45,10 @@ crossbuild:
- linux/arm
- linux/arm64
- freebsd/arm
# Temporarily deactivated as golang.org/x/sys does not have syscalls
# implemented for that os/platform combination.
#- openbsd/arm
#- linux/mips64
#- linux/mips64le
- openbsd/arm
- linux/mips64
- linux/mips64le
- netbsd/arm
- linux/ppc64
- linux/ppc64le
- linux/s390x

13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 8a3b020

Please sign in to comment.