forked from prometheus-operator/prometheus-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (55 loc) · 1.71 KB
/
test-prom-version-upgrade.yaml
File metadata and controls
56 lines (55 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test Prometheus upgrades
on:
workflow_dispatch:
schedule:
- cron: '37 15 * * *' # Every day 15:37
jobs:
upgrade-prometheus:
name: Upgrade Prometheus
runs-on: ubuntu-latest
if: github.repository == 'prometheus-operator/prometheus-operator'
steps:
- name: Reclaim disk space
run: |
docker image prune --force --all
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
- uses: actions/checkout@v5
- name: Import environment variables from file
run: |
cat ".github/env" >> "$GITHUB_ENV"
echo "E2E_DIAGNOSTIC_DIRECTORY=$(mktemp -d)" >> "$GITHUB_ENV"
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: '${{ env.golang-version }}'
check-latest: true
- name: Start KinD
uses: helm/kind-action@v1.12.0
with:
version: ${{ env.kind-version }}
node_image: ${{ env.kind-image }}
wait: 300s
config: ./test/e2e/kind-conf.yaml
cluster_name: e2e
- name: Wait for cluster to finish bootstraping
run: |
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
kubectl cluster-info
kubectl get pods -A
- name: Build and load images
run: |
make test-e2e-images
kubectl apply -f scripts/kind-rbac.yaml
- name: Run tests
env:
E2E_DIAGNOSTIC_DIRECTORY: ${{ env.E2E_DIAGNOSTIC_DIRECTORY }}
run: |
make test-e2e-prometheus-upgrade
- name: Upload diagnostics artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: cluster-state
path: ${{ env.E2E_DIAGNOSTIC_DIRECTORY }}
retention-days: 15