Skip to content

Commit

Permalink
CI: run frr-k8s webhooks e2es
Browse files Browse the repository at this point in the history
We run the frr-k8s webhooks e2es before running MetalLB's to ensure
the webhook was deployed correctly.
This also adds a missing skip to the publish lane, and to the MetalLB-E2E
lane because of the commit bump.

Signed-off-by: Ori Braunshtein <[email protected]>
  • Loading branch information
oribon committed Dec 20, 2023
1 parent daa7b3d commit 747fd88
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/metallb_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: MetalLB E2E Tests
run: |
cd ${GITHUB_WORKSPACE}/metallb
sudo -E env "PATH=$PATH" inv e2etest -b frr --skip "IPV6|DUALSTACK" -e /tmp/kind_logs
sudo -E env "PATH=$PATH" inv e2etest -b frr --skip "IPV6|DUALSTACK|FRRK8S-MODE" -e /tmp/kind_logs
- name: MetalLB E2E Tests - backward compatible
run: |
patch ${GITHUB_WORKSPACE}/metallb-0.12/e2etest/pkg/config/update.go < ${GITHUB_WORKSPACE}/metallb/e2etest/backwardcompatible/patchfile
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/metallb_e2e_frr-k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,27 @@ jobs:
id: metallb_ref
run: echo "content=$(cat ./hack/metallb_ref.txt)" >> $GITHUB_OUTPUT

- name: Read frr-k8s version
id: frrk8s_ref
run: |
wget https://raw.githubusercontent.com/metallb/metallb/${{ steps.metallb_ref.outputs.content }}/charts/metallb/Chart.yaml
echo "content=v$(yq e '.dependencies[] | select(.name == "frr-k8s") | .version' Chart.yaml)" >> $GITHUB_OUTPUT
rm -f Chart.yaml
- name: Checkout MetalLB
uses: actions/checkout@v2
with:
repository: metallb/metallb
path: metallb
ref: "${{ steps.metallb_ref.outputs.content }}"

- name: Checkout frr-k8s
uses: actions/checkout@v2
with:
repository: metallb/frr-k8s
path: frr-k8s
ref: "${{ steps.frrk8s_ref.outputs.content }}"

- name: Install Dependencies
run: |
sudo apt-get update
Expand Down Expand Up @@ -99,11 +113,21 @@ jobs:
make test-e2e
kubectl wait -n metallb-system --for=delete pod -l "component in (speaker,controller,frr-k8s,frr-k8s-webhook-server)" --timeout=180s
- name: Deploy MetalLB
- name: Deploy MetalLB resource
run: |
export KUBECONFIG=${HOME}/.kube/config
kubectl apply -f config/samples/metallb.yaml
- name: frr-k8s E2E Webhooks tests
run: |
export KUBECONFIG=${HOME}/.kube/config
kubectl create ns frr-k8s-system
cd ${GITHUB_WORKSPACE}/frr-k8s
mkdir -p /tmp/kind_logs
# TODO: remove skipping the conflict test, curerntly broken for multiple namespaces
KUBECONFIG_PATH=${HOME}/.kube/config GINKGO_ARGS="--focus Webhooks --skip conflict" TEST_ARGS="--report-path=/tmp/kind_logs" make e2etests
kubectl delete ns frr-k8s-system
- name: MetalLB E2E Tests
run: |
cd ${GITHUB_WORKSPACE}/metallb
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: |
export KUBECONFIG=${HOME}/.kube/config
make test-validation
make test-e2e
SKIP="frr-k8s" make test-e2e
- name: Archive E2E Tests logs
if: ${{ failure() }}
Expand Down

0 comments on commit 747fd88

Please sign in to comment.