From e81a5fbfd95afdee5b6101ed4ec242f47e7cff72 Mon Sep 17 00:00:00 2001 From: lilyLuLiu Date: Fri, 6 Dec 2024 17:18:58 +0800 Subject: [PATCH] try --- .github/workflows/linux-qe-template.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-qe-template.yml b/.github/workflows/linux-qe-template.yml index e4ed5a94d1..e0a0cc9d12 100644 --- a/.github/workflows/linux-qe-template.yml +++ b/.github/workflows/linux-qe-template.yml @@ -35,8 +35,9 @@ jobs: curl -LO "https://gitlab.com/testing-farm/cli/-/raw/main/container/testing-farm" chmod +x testing-farm mv testing-farm /usr/local/bin/ - - sudo yum install podman openssh-server -y + + sudo apt install podman openssh-server -y + testing-farm --help # Get origin commit sha for testing commit_sha=$(cat gh_context.json | jq -r '.event.after') @@ -93,8 +94,10 @@ jobs: # the target can only be accessed through a bastion (which can only be accessed from self-hosted runner) # as so we need to map the ssh-agent from the host to the containers used to access the target host - rm -f id_rsa id_rsa.pub - ssh-keygen -t rsa -N '' -f id_rsa -q + + #rm -f id_rsa id_rsa.pub + ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -q + cp ~/.ssh/id_rsa . eval $(ssh-agent -s) echo $SSH_AUTH_SOCK > ssh_auth_sock echo $SSH_AGENT_PID > ssh_agent_pid @@ -102,7 +105,8 @@ jobs: # reserve machine from testing farm export TESTING_FARM_API_TOKEN=${TESTING_FARM_API_TOKEN} - testing-farm reserve --compose Fedora-40 --duration 480 --arch aarch64 --hardware memory='>= 16 GB' --hardware cpu.processors='>= 4' --hardware virtualization.is-supported='true' --ssh-public-key id_rsa.pub --no-autoconnect | tee info + testing-farm reserve --compose Fedora-40 --duration 480 --arch aarch64 --hardware memory='>= 16 GB' --hardware cpu.processors='>= 4' --hardware virtualization.is-supported='true' --no-autoconnect | tee info1 + sed -r 's/\x1B\[[0-9;]*[mK]//g' info1 > info machine=`tail -n 1 info` echo ${machine##*@} > host echo crctest > username @@ -112,7 +116,8 @@ jobs: echo ${request:1} > requestid # Create a non-root user for testing on the reserved machine - ssh_cmd="ssh -i id_rsa -o StrictHostKeyChecking=no ${machine##*ssh}" + ssh_cmd="ssh -o StrictHostKeyChecking=no ${machine##*ssh}" + ssh-keyscan -H testing-farm.io >> ~/.ssh/known_hosts echo ${machine##*ssh} echo $ssh_cmd $ssh_cmd 'useradd crctest' < /dev/null