Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tests:
- as: cnf-network-functional-tests
capabilities:
- intranet
cron: 0 20 * * 5
cron: 0 22 31 2 *
restrict_network_access: false
steps:
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tests:
- as: cnf-network-functional-tests
capabilities:
- intranet
cron: 0 23 31 2 *
cron: 0 22 31 2 *
restrict_network_access: false
steps:
env:
Expand All @@ -43,6 +43,7 @@ tests:
- ref: telcov10n-functional-cnf-network-gather-artifacts-from-bastion
test:
- ref: telcov10n-functional-cnf-network-eco-gotests
- ref: telcov10n-functional-cnf-network-metallb-e2etests
zz_generated_metadata:
branch: main
org: openshift-kni
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ tests:
- ref: telcov10n-functional-cnf-network-gather-artifacts-from-bastion
test:
- ref: telcov10n-functional-cnf-network-eco-gotests
- ref: telcov10n-functional-cnf-network-metallb-e2etests
zz_generated_metadata:
branch: main
org: openshift-kni
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5159,7 +5159,7 @@ periodics:
secretName: result-aggregator
- agent: kubernetes
cluster: build07
cron: 0 20 * * 5
cron: 0 22 31 2 *
decorate: true
decoration_config:
skip_cloning: true
Expand Down Expand Up @@ -5815,7 +5815,7 @@ periodics:
secretName: result-aggregator
- agent: kubernetes
cluster: build07
cron: 0 23 31 2 *
cron: 0 22 31 2 *
decorate: true
decoration_config:
skip_cloning: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approvers:
- natifridman
- shaior
- kononovn
- eifrach
- timurmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
set -e
set -o pipefail

PROJECT_DIR="/tmp"

echo "Checking if the job should be skipped..."
if [ -f "${SHARED_DIR}/skip.txt" ]; then
echo "Detected skip.txt file — skipping the job"
exit 0
fi

echo "Set CLUSTER_NAME env var"
if [[ -f "${SHARED_DIR}/cluster_name" ]]; then
CLUSTER_NAME=$(cat "${SHARED_DIR}/cluster_name")
fi
export CLUSTER_NAME=${CLUSTER_NAME}
echo "CLUSTER_NAME=${CLUSTER_NAME}"

echo "Set bastion SSH configuration"
cat /var/group_variables/common/all/ansible_ssh_private_key > "${PROJECT_DIR}/temp_ssh_key"
chmod 600 "${PROJECT_DIR}/temp_ssh_key"
BASTION_IP=$(cat /var/host_variables/"${CLUSTER_NAME}"/bastion/ansible_host)
BASTION_USER=$(cat /var/group_variables/common/all/ansible_user)

echo "Run MetalLB deploy playbook"
cd /eco-ci-cd
ansible-playbook ./playbooks/cnf/deploy-run-metallb-tests-script.yaml \
-i ./inventories/cnf/run-tests.yaml \
--extra-vars "kubeconfig=/home/telcov10n/project/generated/${CLUSTER_NAME}/auth/kubeconfig \
metallb_repo=${METALLB_REPO} \
frr_image=${FRR_IMAGE} \
ipv4_service_range=${IPV4_SERVICE_RANGE} \
ipv6_service_range=${IPV6_SERVICE_RANGE}"

echo "Run MetalLB e2e tests via SSH"
ssh -o ServerAliveInterval=60 -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no \
"${BASTION_USER}@${BASTION_IP}" -i "${PROJECT_DIR}/temp_ssh_key" \
"sudo /tmp/metallb/metallb-tests-run.sh || true"

echo "Gather JUnit report from bastion"
mkdir -p "${ARTIFACT_DIR}/junit_metallb"
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
-i "${PROJECT_DIR}/temp_ssh_key" \
"${BASTION_USER}@${BASTION_IP}":/tmp/metallbreport/junit-report.xml \
"${ARTIFACT_DIR}/junit_metallb/junit-report.xml"

rm -f "${PROJECT_DIR}/temp_ssh_key"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path": "telcov10n/functional/cnf-network/metallb-e2etests/telcov10n-functional-cnf-network-metallb-e2etests-ref.yaml",
"owners": {
"approvers": [
"natifridman",
"shaior",
"kononovn",
"eifrach",
"timurmp"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ref:
as: telcov10n-functional-cnf-network-metallb-e2etests
from: src
commands: telcov10n-functional-cnf-network-metallb-e2etests-commands.sh
grace_period: 10s
timeout: 4h0m0s
resources:
requests:
cpu: 100m
memory: 200Mi
env:
- name: CLUSTER_NAME
default: ""
documentation: BM Cluster name
- name: METALLB_REPO
default: https://github.com/openshift/metallb.git
documentation: MetalLB git repository URL
- name: FRR_IMAGE
default: quay.io/frrouting/frr:8.5.3
documentation: FRR container image used by the MetalLB ginkgo test suite
- name: IPV4_SERVICE_RANGE
default: 192.168.10.0/24
documentation: IPv4 address range for MetalLB service allocation during tests
- name: IPV6_SERVICE_RANGE
default: fc00:f853:0ccd:e799::/124
documentation: IPv6 address range for MetalLB service allocation during tests