forked from RamenDR/ramen
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 1.89 KB
/
e2e.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0
---
# yamllint disable rule:line-length
name: E2E
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened]
env:
# Limit number of drenv workers.
MAX_WORKERS: 4
ENV_NAME: rdr-kubevirt
ENV_FILE: envs/regional-dr-kubevirt.yaml
jobs:
e2e-rdr-virt:
runs-on: [self-hosted, e2e-rdr-virt]
if: github.repository == 'nirs/ramen' && github.event.pull_request.author_association == 'OWNER'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Create virtual environment
run: |
hack/make-venv .venv
- name: Delete clusters
if: ${{ always() }}
working-directory: test
run: |
source ../venv
drenv delete ${{ env.ENV_FILE }}
- name: Setup libvirt
run: test/scripts/setup-libvirt
- name: Start clusters
uses: nick-fields/retry@v3
with:
timeout_minutes: 20
max_attempts: 3
command: |
cd test
source ../venv
drenv start --max-workers ${{ env.MAX_WORKERS }} ${{ env.ENV_FILE }}
- name: Build ramen-operator container
run: make docker-build
- name: Deploy ramen
working-directory: test
run: |
source ../venv
ramenctl deploy --source-dir .. ${{ env.ENV_FILE }}
- name: Configure ramen
uses: nick-fields/retry@v3
with:
timeout_seconds: 60
max_attempts: 3
command: |
cd test
source ../venv
ramenctl config ${{ env.ENV_FILE }}
- name: Delete clusters
if: ${{ always() }}
working-directory: test
run: |
source ../venv
drenv delete ${{ env.ENV_FILE }}
- name: Cleanup drenv
if: ${{ always() }}
working-directory: test
run: |
source ../venv
drenv cleanup -v