Skip to content

Commit

Permalink
Merge pull request #770 from prometheus/repo_sync
Browse files Browse the repository at this point in the history
Synchronize common files from prometheus/prometheus
  • Loading branch information
mem authored Mar 31, 2021
2 parents ced9438 + 3816ed7 commit 47423bf
Showing 1 changed file with 52 additions and 60 deletions.
112 changes: 52 additions & 60 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
---
version: 2.1

orbs:
prometheus: prometheus/[email protected]

prometheus: prometheus/[email protected]
executors:
# Whenever the Go version is updated here, .promu.yml should also be updated.
golang:
docker:
- image: circleci/golang:1.16

- image: circleci/golang:1.16
jobs:
test:
executor: golang

steps:
- prometheus/setup_environment
- run: make
- prometheus/store_artifact:
file: blackbox_exporter
- run: git diff --exit-code

- prometheus/setup_environment
- run: make
- prometheus/store_artifact:
file: blackbox_exporter
- run: git diff --exit-code
# IPv6 tests require the machine executor.
# See https://circleci.com/docs/2.0/faq/#can-i-use-ipv6-in-my-tests for details.
test-ipv6:
Expand All @@ -30,55 +24,53 @@ jobs:
# should also be updated.
environment:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.16-base

steps:
- checkout
- run:
name: enable ipv6
command: |
cat \<<'EOF' | sudo tee /etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}
EOF
sudo service docker restart
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i github.com/prometheus/blackbox_exporter -T

- checkout
- run:
name: enable ipv6
command: |
cat \<<'EOF' | sudo tee /etc/docker/daemon.json
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64"
}
EOF
sudo service docker restart
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i github.com/prometheus/blackbox_exporter -T
workflows:
version: 2
blackbox_exporter:
jobs:
- test:
filters:
tags:
only: /.*/
- test-ipv6:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
filters:
tags:
only: /.*/
- prometheus/publish_master:
context: org-context
requires:
- test
- test-ipv6
- build
filters:
branches:
only: master
- prometheus/publish_release:
context: org-context
requires:
- test
- test-ipv6
- build
filters:
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
- test:
filters:
tags:
only: /.*/
- test-ipv6:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
filters:
tags:
only: /.*/
- prometheus/publish_master:
context: org-context
requires:
- test
- test-ipv6
- build
filters:
branches:
only: master
- prometheus/publish_release:
context: org-context
requires:
- test
- test-ipv6
- build
filters:
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/

0 comments on commit 47423bf

Please sign in to comment.