Skip to content

Commit

Permalink
Merge pull request #142 from rhobs/automated-updates-master
Browse files Browse the repository at this point in the history
OCPBUGS-1718: [bot] Bump openshift/prometheus to v2.39.1
  • Loading branch information
openshift-merge-robot committed Oct 14, 2022
2 parents 60d6ccf + e26c080 commit c3cbff9
Show file tree
Hide file tree
Showing 745 changed files with 53,119 additions and 26,748 deletions.
182 changes: 10 additions & 172 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,195 +1,33 @@
---
version: 2.1
# Prometheus has switched to GitHub action.
# Circle CI is not disabled repository-wise so that previous pull requests
# continue working.
# This file does not generate any CircleCI workflow.

orbs:
prometheus: prometheus/prometheus@0.16.0
go: circleci/go@1.7.0
win: circleci/windows@2.3.0
version: 2.1

executors:
# Whenever the Go version is updated here, .promu.yml
# should also be updated.
golang:
docker:
- image: quay.io/prometheus/golang-builder:1.18-base
golang_oldest:
docker:
- image: quay.io/prometheus/golang-builder:1.17-base
- image: busybox

jobs:
test_go:
noopjob:
executor: golang

steps:
- prometheus/setup_environment
- go/load-cache:
key: v1
- run:
command: make GO_ONLY=1
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"
GOMAXPROCS: "2"
GO111MODULE: "on"
- run: go test ./tsdb/ -test.tsdb-isolation=false
- run: make -C documentation/examples/remote_storage
- run: make -C documentation/examples
- prometheus/check_proto:
version: "3.15.8"
- prometheus/store_artifact:
file: prometheus
- prometheus/store_artifact:
file: promtool
- go/save-cache:
key: v1
- store_test_results:
path: test-results

test_ui:
executor: golang

steps:
- checkout
- restore_cache:
keys:
- v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
- v3-npm-deps-
- run: make assets-tarball
- run: make ui-lint
- run: make ui-test
- persist_to_workspace:
root: .
paths:
- .tarballs
- save_cache:
key: v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
paths:
- ~/.npm

test_windows:
executor:
name: win/default
shell: powershell
working_directory: /go/src/github.com/prometheus/prometheus
steps:
- checkout
- run:
# Temporary workaround until circleci updates go.
command: |
choco upgrade -y golang
- run:
command: refreshenv
- run:
command: |
$TestTargets = go list ./... | Where-Object { $_ -NotMatch "(github.com/prometheus/prometheus/discovery.*|github.com/prometheus/prometheus/config|github.com/prometheus/prometheus/web)"}
go test $TestTargets -vet=off -v
environment:
GOGC: "20"
GOOPTS: "-p 2"

test_golang_oldest:
executor: golang_oldest
steps:
- checkout
- run: make build
- run: go test ./tsdb/...
- run: go test ./tsdb/ -test.tsdb-isolation=false

test_mixins:
executor: golang
steps:
- checkout
- run: go install ./cmd/promtool/.
- run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- run: make -C documentation/prometheus-mixin clean
- run: make -C documentation/prometheus-mixin jb_install
- run: make -C documentation/prometheus-mixin
- run: git diff --exit-code

repo_sync:
executor: golang
steps:
- checkout
- run: ./scripts/sync_repo_files.sh
command: "true"

workflows:
version: 2
prometheus:
jobs:
- test_go:
filters:
tags:
only: /.*/
- test_ui:
filters:
tags:
only: /.*/
- test_golang_oldest:
filters:
tags:
only: /.*/
- test_mixins:
filters:
tags:
only: /.*/
- test_windows:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
parallelism: 3
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
filters:
tags:
ignore: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /^(main|release-.*|.*build-all.*)$/
- prometheus/build:
name: build_all
parallelism: 12
filters:
branches:
only: /^(main|release-.*|.*build-all.*)$/
tags:
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
- prometheus/publish_main:
context: org-context
requires:
- test_go
- test_ui
- build_all
filters:
branches:
only: main
image: circleci/golang:1-node
- prometheus/publish_release:
context: org-context
requires:
- test_go
- test_ui
- build_all
filters:
tags:
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
image: circleci/golang:1-node
daily:
- noopjob
triggers:
- schedule:
cron: "49 19 * * *"
cron: "0 0 30 2 *"
filters:
branches:
only:
- main
jobs:
- repo_sync:
context: org-context
23 changes: 23 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build
inputs:
thread:
type: integer
description: Current thread
required: true
default: 3
parallelism:
type: integer
description: Number of builds to do in parallel
default: 3
promu_opts:
type: string
description: Options to pass to promu
runs:
using: composite
steps:
- uses: ./.github/actions/setup_environment
- run: ~/go/bin/promu crossbuild -v --parallelism ${{ inputs.parallelism }} --parallelism-thread ${{ inputs.thread }} ${{ inputs.promu_opts }}
shell: bash
- uses: ./.github/actions/save_artifacts
with:
directory: .build
20 changes: 20 additions & 0 deletions .github/actions/check_proto/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check proto files
inputs:
version:
type: string
description: Protoc version
default: "3.5.1"
runs:
using: composite
steps:
- run: |
env
set -x
curl -s -L https://github.com/protocolbuffers/protobuf/releases/download/v${{ inputs.version }}/protoc-${{ inputs.version }}-linux-x86_64.zip > /tmp/protoc.zip
unzip -d /tmp /tmp/protoc.zip
chmod +x /tmp/bin/protoc
export PATH=/tmp/bin:$PATH
make proto
shell: bash
- run: git diff --exit-code
shell: bash
47 changes: 47 additions & 0 deletions .github/actions/publish_images/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish image
inputs:
registry:
type: string
description: Docker registry
organization:
type: string
description: Organization
login:
type: string
description: Username
password:
type: string
description: Password
dockerfile_path:
description: Path to Dockerfile
type: string
default: ""
dockerbuild_context:
description: Path to Dockerbuild context
type: string
default: ""
container_image_name:
description: Name of the container image
type: string
default: ""
runs:
using: composite
steps:
- if: inputs.dockerfile_path != ''
run: echo "export DOCKERFILE_PATH=${{ inputs.dockerfile_path }}" >> /tmp/tmp-profile
shell: bash
- if: inputs.container_image_name != ''
run: echo "export DOCKER_IMAGE_NAME=${{ inputs.container_image_name }}" >> /tmp/tmp-profile
shell: bash
- if: inputs.dockerbuild_context != ''
run: echo "export DOCKERBUILD_CONTEXT=${{ inputs.dockerbuild_context }}" >> /tmp/tmp-profile
shell: bash
- run: |
touch /tmp/tmp-profile
. /tmp/tmp-profile
make docker DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
docker images
echo ${{ inputs.password }} | docker login -u ${{ inputs.login }} --password-stdin ${{ inputs.registry }}
make docker-publish DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
make docker-manifest DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
shell: bash
43 changes: 43 additions & 0 deletions .github/actions/publish_main/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish image
inputs:
docker_hub_organization:
type: string
description: DockerHub organization
default: prom
docker_hub_login:
type: string
description: DockerHub username
docker_hub_password:
type: string
description: DockerHub password
quay_io_organization:
type: string
description: Quay.io organization
default: prometheus
quay_io_login:
type: string
description: Quay.io username
quay_io_password:
type: string
description: Quay.io password
runs:
using: composite
steps:
- uses: ./.github/actions/setup_environment
with:
enable_docker_multibuild: true
- uses: ./.github/actions/restore_artifacts
- uses: ./.github/actions/publish_images
if: inputs.docker_hub_organization != '' && inputs.docker_hub_login != ''
with:
registry: docker.io
organization: ${{ inputs.docker_hub_organization }}
login: ${{ inputs.docker_hub_login }}
password: ${{ inputs.docker_hub_password }}
- uses: ./.github/actions/publish_images
if: inputs.quay_io_organization != '' && inputs.quay_io_login != ''
with:
registry: quay.io
organization: ${{ inputs.quay_io_organization }}
login: ${{ inputs.quay_io_login }}
password: ${{ inputs.quay_io_password }}
54 changes: 54 additions & 0 deletions .github/actions/publish_release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish image
inputs:
docker_hub_organization:
type: string
description: DockerHub organization
default: prom
docker_hub_login:
type: string
description: DockerHub username
docker_hub_password:
type: string
description: DockerHub password
quay_io_organization:
type: string
description: Quay.io organization
default: prometheus
quay_io_login:
type: string
description: Quay.io username
quay_io_password:
type: string
description: Quay.io password
github_token:
type: string
description: Github Token
runs:
using: composite
steps:
- uses: ./.github/actions/setup_environment
with:
enable_docker_multibuild: true
- uses: ./.github/actions/restore_artifacts
- run: ~/go/bin/promu crossbuild tarballs
shell: bash
- run: ~/go/bin/promu checksum .tarballs
shell: bash
- run: ~/go/bin/promu release .tarballs
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
- uses: ./.github/actions/publish_release_images
if: inputs.docker_hub_organization != '' && inputs.docker_hub_login != ''
with:
registry: docker.io
organization: ${{ inputs.docker_hub_organization }}
login: ${{ inputs.docker_hub_login }}
password: ${{ inputs.docker_hub_password }}
- uses: ./.github/actions/publish_release_images
if: inputs.quay_io_organization != '' && inputs.quay_io_login != ''
with:
registry: quay.io
organization: ${{ inputs.quay_io_organization }}
login: ${{ inputs.quay_io_login }}
password: ${{ inputs.quay_io_password }}

0 comments on commit c3cbff9

Please sign in to comment.