1717 HTTPS_ENABLE : true
1818 NETBOX_RESTORATION_HASH_FIELD_NAME : netboxOperatorRestorationHash
1919jobs :
20- e2e-tests :
21- name : E2E tests for netbox operator
20+ e2e-tests-3-7-8 :
21+ name : Against netbox version 3.7.8
2222 runs-on : ubuntu-latest
2323 steps :
2424 - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2828 - name : Import environment variables from file
2929 run : |
3030 cat ".github/env" >> "$GITHUB_ENV"
31- echo "E2E_DIAGNOSTIC_DIRECTORY=$(mktemp -d)" >> "$GITHUB_ENV"
3231 - name : Start kind cluster
3332 uses : helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
3433 with :
@@ -47,27 +46,88 @@ jobs:
4746 kubectl get pods -A
4847 echo "Cluster information"
4948 kubectl cluster-info
50- - name : Setup kind cluster with required software such as NetBox
49+ - name : Run e2e tests
5150 run : |
52- make create-kind
53- - name : Deploy NetBox operator to the kind cluster
51+ # # Very straight forward way of implementing a test and checking the result
52+ # kubectl apply -f config/samples/netbox_v1_prefixclaim.yaml
53+ # kubectl get prefixclaim,prefix,ipaddressclaim,ipaddress,iprange,iprangeclaim
54+ # kubectl wait --for=condition=ready --timeout=30s prefixclaim.netbox.dev/prefixclaim-sample
55+
56+ # Use Chainsaw
57+ make test-e2e-3.7.8
58+ e2e-tests-4-0-11 :
59+ name : Against netbox version 4.0.11
60+ runs-on : ubuntu-latest
61+ steps :
62+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
63+ - uses : actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
64+ with :
65+ go-version : 1.23.4
66+ - name : Import environment variables from file
5467 run : |
55- make deploy-kind
56- - name : Run tests
57- env :
58- E2E_DIAGNOSTIC_DIRECTORY : ${{ env.E2E_DIAGNOSTIC_DIRECTORY }}
68+ cat ".github/env" >> "$GITHUB_ENV"
69+ - name : Start kind cluster
70+ uses : helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
71+ with :
72+ version : ${{ env.kind-version }}
73+ node_image : ${{ env.kind-image }}
74+ wait : 300s
75+ config : ./tests/e2e/kind-config.yaml
76+ cluster_name : e2e
77+ - name : Wait for cluster to finish bootstraping
78+ run : |
79+ echo "Waiting for all nodes to be ready..."
80+ kubectl wait --for=condition=Ready nodes --all --timeout=120s
81+ kubectl get nodes
82+ echo "Waiting for all pods to be ready..."
83+ kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
84+ kubectl get pods -A
85+ echo "Cluster information"
86+ kubectl cluster-info
87+ - name : Run e2e tests
5988 run : |
6089 # # Very straight forward way of implementing a test and checking the result
6190 # kubectl apply -f config/samples/netbox_v1_prefixclaim.yaml
6291 # kubectl get prefixclaim,prefix,ipaddressclaim,ipaddress,iprange,iprangeclaim
6392 # kubectl wait --for=condition=ready --timeout=30s prefixclaim.netbox.dev/prefixclaim-sample
6493
6594 # Use Chainsaw
66- make test-e2e
67- - name : Upload diagnostics artifact
68- if : ${{ failure() }}
69- uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
95+ make test-e2e-4.0.11
96+ e2e-tests-4-1-7 :
97+ name : Against netbox version 4.1.7
98+ runs-on : ubuntu-latest
99+ steps :
100+ - uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
101+ - uses : actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
102+ with :
103+ go-version : 1.23.4
104+ - name : Import environment variables from file
105+ run : |
106+ cat ".github/env" >> "$GITHUB_ENV"
107+ - name : Start kind cluster
108+ uses : helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
70109 with :
71- name : cluster-state
72- path : ${{ env.E2E_DIAGNOSTIC_DIRECTORY }}
73- retention-days : 15
110+ version : ${{ env.kind-version }}
111+ node_image : ${{ env.kind-image }}
112+ wait : 300s
113+ config : ./tests/e2e/kind-config.yaml
114+ cluster_name : e2e
115+ - name : Wait for cluster to finish bootstraping
116+ run : |
117+ echo "Waiting for all nodes to be ready..."
118+ kubectl wait --for=condition=Ready nodes --all --timeout=120s
119+ kubectl get nodes
120+ echo "Waiting for all pods to be ready..."
121+ kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=300s
122+ kubectl get pods -A
123+ echo "Cluster information"
124+ kubectl cluster-info
125+ - name : Run e2e tests
126+ run : |
127+ # # Very straight forward way of implementing a test and checking the result
128+ # kubectl apply -f config/samples/netbox_v1_prefixclaim.yaml
129+ # kubectl get prefixclaim,prefix,ipaddressclaim,ipaddress,iprange,iprangeclaim
130+ # kubectl wait --for=condition=ready --timeout=30s prefixclaim.netbox.dev/prefixclaim-sample
131+
132+ # Use Chainsaw
133+ make test-e2e-4.1.7
0 commit comments