* Move make test from Travis to CircleCI.
* Drop Travis testing.
* Bump prometheus orb to latest.
* Update Makefile.common.
* Use default build target list.
* Switch CI prober tests env var to generic "CI" variable.
Signed-off-by: Ben Kochie <superq@gmail.com>
version: 2.1
orbs:
- prometheus: prometheus/prometheus@0.1.0
+ prometheus: prometheus/prometheus@0.8.0
+
+executors:
+ # Whenever the Go version is updated here, .promu.yml should also be updated.
+ golang:
+ docker:
+ - image: circleci/golang:1.15
jobs:
+ test:
+ executor: golang
+
+ steps:
+ - 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:
+ test-ipv6:
machine: true
working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/blackbox_exporter
# Whenever the Go version is updated here, .travis.yml and .promu.yml
filters:
tags:
only: /.*/
+ - test-ipv6:
+ filters:
+ tags:
+ only: /.*/
- prometheus/build:
name: build
filters:
context: org-context
requires:
- test
+ - test-ipv6
- build
filters:
branches:
context: org-context
requires:
- test
+ - test-ipv6
- build
filters:
tags:
- blackbox.yml
- LICENSE
- NOTICE
-crossbuild:
- platforms:
- - linux/amd64
- - linux/386
- - darwin/amd64
- - windows/amd64
- - windows/386
- - freebsd/amd64
- - freebsd/386
- - openbsd/amd64
- - openbsd/386
- - netbsd/amd64
- - netbsd/386
- - dragonfly/amd64
- - linux/arm
- - linux/arm64
- - freebsd/arm
- - openbsd/arm
- - linux/mips64
- - linux/mips64le
- # Temporarily deactivated as golang.org/x/sys does not have syscalls
- # implemented for that os/platform combination.
- #- netbsd/arm
- - linux/ppc64
- - linux/ppc64le
+++ /dev/null
-sudo: false
-
-language: go
-
-# Whenever the Go version is updated here, .circleci/config.yml and .promu.yml
-# should also be updated.
-go:
-- 1.15.x
-
-go_import_path: github.com/prometheus/blackbox_exporter
-
-script:
-- make
-- git diff --exit-code
endif
endif
-PROMU_VERSION ?= 0.5.0
+PROMU_VERSION ?= 0.7.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
GOLANGCI_LINT :=
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)"
+DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION)))
.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS)
common-docker-tag-latest: $(TAG_DOCKER_ARCHS)
$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%:
docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"
+ docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"
.PHONY: common-docker-manifest
common-docker-manifest:
}
func TestRecursiveDNSResponse(t *testing.T) {
- if os.Getenv("TRAVIS") == "true" {
- t.Skip("skipping; travisci is failing on ipv6 dns requests")
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
}
tests := []struct {
}
func TestAuthoritativeDNSResponse(t *testing.T) {
- if os.Getenv("TRAVIS") == "true" {
- t.Skip("skipping; travisci is failing on ipv6 dns requests")
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
}
tests := []struct {
}
func TestServfailDNSResponse(t *testing.T) {
- if os.Getenv("TRAVIS") == "true" {
- t.Skip("skipping; travisci is failing on ipv6 dns requests")
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
}
tests := []struct {
}
func TestDNSProtocol(t *testing.T) {
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
+ }
+
// This test assumes that listening TCP listens both IPv6 and IPv4 traffic and
// localhost resolves to both 127.0.0.1 and ::1. we must skip the test if either
// of these isn't true. This should be true for modern Linux systems.
}
func TestTCPConnectionWithTLS(t *testing.T) {
- if os.Getenv("TRAVIS") == "true" {
- t.Skip("skipping; travisci is failing on ipv6 dns requests")
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
}
ln, err := net.Listen("tcp", ":0")
}
func TestTCPConnectionWithTLSAndVerifiedCertificateChain(t *testing.T) {
- if os.Getenv("TRAVIS") == "true" {
- t.Skip("skipping; travisci is failing on ipv6 dns requests")
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
}
ln, err := net.Listen("tcp", "127.0.0.1:0")
}
func TestTCPConnectionProtocol(t *testing.T) {
+ if os.Getenv("CI") == "true" {
+ t.Skip("skipping; CI is failing on ipv6 dns requests")
+ }
+
// This test assumes that listening TCP listens both IPv6 and IPv4 traffic and
// localhost resolves to both 127.0.0.1 and ::1. we must skip the test if either
// of these isn't true. This should be true for modern Linux systems.