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>
(cherry picked from commit 7b74bd8)
(cherry picked from commit be0ae5f)
(cherry picked from commit f73ee93)
(cherry picked from commit 23cfe97)
(cherry picked from commit 171fe84)
(cherry picked from commit 05e992d)
(cherry picked from commit 77d2346)
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
(cherry picked from commit ce16176)
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
(cherry picked from commit 250a582)
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
(cherry picked from commit a50d65a)
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
  • Loading branch information
creydr authored and dougsland committed May 17, 2023
1 parent d207e3f commit cdb4ea2
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 cdb4ea2

Please sign in to comment.