mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 09:16:38 +00:00
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
---
|
|
dist: xenial
|
|
language: go
|
|
go:
|
|
- "1.14.x"
|
|
go_import_path: github.com/prometheus-operator/prometheus-operator
|
|
services:
|
|
- docker
|
|
before_install:
|
|
- export PATH=$PATH:$HOME/.local/bin
|
|
# k8s >= 1.18 requires conntrack, ebtables and socat.
|
|
- sudo apt update -y
|
|
- sudo apt install -y conntrack ebtables socat
|
|
jobs:
|
|
include:
|
|
- name: "Sanity checks and tests"
|
|
stage: test
|
|
# Check generated contents are up to date and code & docs files are formatted.
|
|
script: make --always-make format generate && git diff --exit-code
|
|
- name: "Build Prometheus Operator rule config map to rule file CRDs CLI tool"
|
|
script: cd cmd/po-rule-migration && go install
|
|
- name: "Ensure vendor folder matches vendor.json"
|
|
script: make --always-make vendor && git diff --exit-code vendor/
|
|
- name: "Run unit tests"
|
|
script: make test-unit
|
|
- name: "Run e2e tests (Alertmanager)"
|
|
script: EXCLUDE_PROMETHEUS_TESTS=true EXCLUDE_THANOS_TESTS=true ./scripts/travis-e2e.sh
|
|
- name: "Run e2e tests (Prometheus)"
|
|
script: EXCLUDE_ALERTMANAGER_TESTS=true EXCLUDE_THANOS_TESTS=true ./scripts/travis-e2e.sh
|
|
- name: "Run e2e tests (Thanos)"
|
|
script: EXCLUDE_PROMETHEUS_TESTS=true EXCLUDE_ALERTMANAGER_TESTS=true ./scripts/travis-e2e.sh
|
|
|
|
- name: "Push Docker Image"
|
|
stage: push-docker-image
|
|
script: ./scripts/travis-push-docker-image.sh
|
|
|
|
stages:
|
|
- test
|
|
- name: push-docker-image
|
|
if: type != pull_request
|