1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 11:48:53 +00:00

remove travis config and helper scripts

This commit is contained in:
paulfantom 2020-09-08 16:02:17 +02:00
parent 9b146f87f4
commit 94d0bd7e93
No known key found for this signature in database
GPG key ID: 12AE0185401674E7
5 changed files with 0 additions and 201 deletions

View file

@ -1,40 +0,0 @@
---
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: "Run unit tests"
script: make test-unit
- name: "Run extended tests"
script: make test-long
- 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

View file

@ -1,67 +0,0 @@
#!/usr/bin/env bash
# exit immediately when a command fails
set -e
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# error on unset variables
set -u
# print each command before executing it
set -x
export MINIKUBE_VERSION=v1.9.2
export KUBERNETES_VERSION=v1.18.1
sudo mount --make-rshared /
sudo mount --make-rshared /proc
sudo mount --make-rshared /sys
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBERNETES_VERSION/bin/linux/amd64/kubectl && \
chmod +x kubectl && \
sudo mv kubectl /usr/local/bin/
curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64 && \
chmod +x minikube && \
sudo mv minikube /usr/local/bin/
export MINIKUBE_HOME=$HOME
export CHANGE_MINIKUBE_NONE_USER=true
mkdir "${HOME}"/.kube || true
touch "${HOME}"/.kube/config
export KUBECONFIG=$HOME/.kube/config
# minikube config
minikube config set WantUpdateNotification false
minikube config set WantReportErrorPrompt false
minikube config set WantNoneDriverWarning false
minikube config set vm-driver none
minikube config view
# Setup Docker according to https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker
cat > daemon.json <<EOF
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF
sudo mkdir -p /etc/docker
sudo mv daemon.json /etc/docker/daemon.json
# Restart Docker
sudo systemctl daemon-reload
sudo systemctl restart docker
docker info
minikube version
sudo minikube start --kubernetes-version=$KUBERNETES_VERSION
sudo chown -R travis: /home/travis/.minikube/
minikube update-context
# waiting for node(s) to be ready
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
kubectl apply -f scripts/minikube-rbac.yaml

View file

@ -1,14 +0,0 @@
#!/usr/bin/env bash
# exit immediately when a command fails
set -e
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# error on unset variables
set -u
# print each command before executing it
set -x
export KUBECONFIG=$HOME/.kube/config
minikube version
sudo minikube delete

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
# exit immediately when a command fails
set -e
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# error on unset variables
set -u
# print each command before executing it
set -x
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
"${SCRIPT_DIR}"/create-minikube.sh
make build image
export TEST_RUN_ARGS="-failfast"
make test-e2e
"${SCRIPT_DIR}"/delete-minikube.sh

View file

@ -1,61 +0,0 @@
#!/usr/bin/env bash
# exit immediately when a command fails
set -e
# only exit with zero if all commands of the pipeline exit successfully
set -o pipefail
# error on unset variables
set -u
function defer {
docker logout quay.io
}
trap defer EXIT
CPU_ARCHS="amd64 arm64 arm"
# Push to Quay '-dev' repo if it's not a git tag or master branch build.
export REPO="${REPO:-"quay.io/prometheus-operator/prometheus-operator"}"
export REPO_PROMETHEUS_CONFIG_RELOADER="${REPO_PROMETHEUS_CONFIG_RELOADER:-"quay.io/prometheus-operator/prometheus-config-reloader"}"
if [[ "${TRAVIS_TAG}" == "" ]] && [[ "${TRAVIS_BRANCH}" != master ]]; then
export REPO="quay.io/prometheus-operator/prometheus-operator-dev"
export REPO_PROMETHEUS_CONFIG_RELOADER="quay.io/prometheus-operator/prometheus-config-reloader-dev"
fi
# For both git tags and git branches 'TRAVIS_BRANCH' contains the name.
export TAG="${TRAVIS_BRANCH}"
for arch in ${CPU_ARCHS}; do
make --always-make image GOARCH="$arch" TAG="${TAG}-$arch"
done
if [ "$TRAVIS" == "true" ]; then
# Workaround for docker bug https://github.com/docker/for-linux/issues/396
sudo chmod o+x /etc/docker
fi
# TODO(paulfantom): Remove this after v0.43.0 release as it won't be needed
if [ -z "${QUAY_COREOS_PASSWORD+x}" ]; then
echo "${QUAY_COREOS_PASSWORD}" | docker login -u "${QUAY_COREOS_USERNAME}" --password-stdin quay.io
else
echo "${QUAY_PASSWORD}" | docker login -u "${QUAY_USERNAME}" --password-stdin quay.io
fi
export DOCKER_CLI_EXPERIMENTAL=enabled
for r in ${REPO} ${REPO_PROMETHEUS_CONFIG_RELOADER}; do
# Images need to be on remote registry before creating manifests
for arch in $CPU_ARCHS; do
docker push "${r}:${TAG}-$arch"
done
# Create manifest to join all images under one virtual tag
docker manifest create -a "${r}:${TAG}" \
"${r}:${TAG}-amd64" \
"${r}:${TAG}-arm64" \
"${r}:${TAG}-arm"
# Annotate to set which image is build for which CPU architecture
for arch in $CPU_ARCHS; do
docker manifest annotate --arch "$arch" "${r}:${TAG}" "${r}:${TAG}-$arch"
done
docker manifest push "${r}:${TAG}"
done