Skip to content

Commit

Permalink
UPSTREAM: <carry>: Add ssh proxy for e2e tests in CI
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
  • Loading branch information
creydr committed Dec 17, 2021
1 parent 83aaa56 commit 7b74bd8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hack/ocp-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ export KUBEVIRT_PROVIDER=external
export IMAGE_BUILDER=podman
export DEV_IMAGE_REGISTRY=quay.io
export KUBEVIRTCI_RUNTIME=podman
export SSH=./hack/ssh.sh
export PRIMARY_NIC=enp2s0
export FIRST_SECONDARY_NIC=enp3s0
export SECOND_SECONDARY_NIC=enp4s0

SKIPPED_TESTS="user-guide|bridged"

if [ "${CI}" == "true" ]; then
source ${SHARED_DIR}/fix-uid.sh
export SSH=./hack/ssh-ci.sh
else
export SSH=./hack/ssh.sh
fi

if oc get ns openshift-ovn-kubernetes &> /dev/null; then
# We are using OVNKubernetes -> use enp1s0 as primary nic
export PRIMARY_NIC=enp1s0
Expand Down
7 changes: 7 additions & 0 deletions hack/ssh-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
node_name=${1}
node_ip=$(oc get no ${node_name} -ojsonpath='{.status.addresses[?(.type=="InternalIP")].address}')
IP="$(cat ${SHARED_DIR}/server-ip)"
SSHOPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"

ssh ${SSHOPTS} -i ${CLUSTER_PROFILE_DIR}/packet-ssh-key root@${IP} "ssh ${SSHOPTS} core@${node_ip} -- ${@:3}"

0 comments on commit 7b74bd8

Please sign in to comment.