diff --git a/.github/workflows/linux-qe-template.yml b/.github/workflows/linux-qe-template.yml index e4ed5a94d1..92381c19c4 100644 --- a/.github/workflows/linux-qe-template.yml +++ b/.github/workflows/linux-qe-template.yml @@ -32,11 +32,9 @@ jobs: - name: prepare run: | # Install Testing farm CLI - 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 + pip3 install --user tft-cli + 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 +91,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 +102,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 +113,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