Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu committed Dec 11, 2024
1 parent b2044ee commit 0ce2c33
Showing 1 changed file with 13 additions and 26 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/linux-qe-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,14 @@ jobs:
status_context="${status_context}/Linux-ARM64"
echo "status_context=${status_context}" >> "$GITHUB_ENV"
version_line=$(cat Makefile | grep "OPENSHIFT_VERSION ?=")
bundle_version=${version_line##*= }
echo "bundle_version=${bundle_version}" >> "$GITHUB_ENV"
ocp_version_line=$(cat Makefile | grep "OPENSHIFT_VERSION ?=")
ocp_bundle_v=${ocp_version_line##*= }
echo "ocp_bundle_v=${ocp_bundle_v}" >> "$GITHUB_ENV"
echo "ocp_bundle_v=${ocp_bundle_v}"
microshift_version_line=$(cat Makefile | grep "MICROSHIFT_VERSION ?=")
microshift_bundle_v=${microshift_version_line##*= }
echo "microshift_bundle_v=${microshift_bundle_v}" >> "$GITHUB_ENV"
echo "microshift_bundle_v=${microshift_bundle_v}"
- name: Download linux binary
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -110,20 +114,15 @@ 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 virtualization.is-supported='true' --no-autoconnect | tee info1
sed -r 's/\x1B\[[0-9;]*[mK]//g' info1 > info
testing-farm reserve --compose Fedora-40 --duration 480 --arch aarch64 --hardware memory='>= 16 GB' --hardware virtualization.is-supported='true' --no-autoconnect | tee info
machine=`tail -n 1 info`
echo ${machine##*@} > host
echo crctest > username
echo proxy > bastion_username
echo testing-farm.io > bastion_host
request=`sed -n '4p' info`
echo ${request:1} > requestid
# Create a non-root user for testing on the reserved machine
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
$ssh_cmd 'echo "crctest:redhat" | chpasswd' < /dev/null
Expand All @@ -139,14 +138,10 @@ jobs:
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
-e TARGET_HOST_KEY_PATH=/data/id_rsa \
-e BASTION_HOST_USERNAME=$(cat bastion_username) \
-e BASTION_HOST=$(cat bastion_host) \
-e TARGET_FOLDER=crc-support \
-e TARGET_CLEANUP='false' \
-e OUTPUT_FOLDER=/data \
-e DEBUG='true' \
-e SSH_AUTH_SOCK=$(cat ssh_auth_sock) \
-v "$(cat ssh_auth_sock):$(cat ssh_auth_sock)" \
-v ${PWD}:/data:z \
-v ${PWD}/crc:/opt/crc-support/crc:z \
quay.io/crc-org/ci-crc-support:v2.0.0-dev-linux crc-support/run.sh \
Expand All @@ -161,24 +156,20 @@ jobs:
echo "Start download bundle on reserved machine"
if [[ "${{inputs.preset}}" == "microshift" ]]; then
bundle_url="https://crcqe-asia.s3.ap-south-1.amazonaws.com/bundles/microshift/${{ env.bundle_version }}-arm64"
bundle_name="crc_microshift_libvirt_${{ env.bundle_version }}_arm64.crcbundle"
bundle_url="https://crcqe-asia.s3.ap-south-1.amazonaws.com/bundles/microshift/${{ env.microshift_bundle_v }}-arm64"
bundle_name="crc_microshift_libvirt_${{ env.microshift_bundle_v }}_arm64.crcbundle"
else
bundle_url="https://crcqe-asia.s3.ap-south-1.amazonaws.com/bundles/openshift/${{ env.bundle_version }}-arm64"
bundle_name="crc_libvirt_${{ env.bundle_version }}_arm64.crcbundle"
bundle_url="https://crcqe-asia.s3.ap-south-1.amazonaws.com/bundles/openshift/${{ env.ocp_bundle_v }}-arm64"
bundle_name="crc_libvirt_${{ env.ocp_bundle_v }}_arm64.crcbundle"
fi
podman run --rm -d --privileged --name download_bundle \
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
-e TARGET_HOST_KEY_PATH=/data/id_rsa \
-e BASTION_HOST_USERNAME=$(cat bastion_username) \
-e BASTION_HOST=$(cat bastion_host) \
-e TARGET_FOLDER=crc-support \
-e TARGET_CLEANUP='false' \
-e OUTPUT_FOLDER=/data \
-e DEBUG='true' \
-e SSH_AUTH_SOCK=$(cat ssh_auth_sock) \
-v "$(cat ssh_auth_sock):$(cat ssh_auth_sock)" \
-v ${PWD}:/data:z \
quay.io/crc-org/ci-crc-support:v2.0.0-dev-linux crc-support/run.sh \
-targetPath "/home/crctest" \
Expand Down Expand Up @@ -213,14 +204,10 @@ jobs:
-e TARGET_HOST=$(cat host) \
-e TARGET_HOST_USERNAME=$(cat username) \
-e TARGET_HOST_KEY_PATH=/data/id_rsa \
-e BASTION_HOST_USERNAME=$(cat bastion_username) \
-e BASTION_HOST=$(cat bastion_host) \
-e TARGET_FOLDER=crc-qe \
-e TARGET_RESULTS=results \
-e OUTPUT_FOLDER=/data \
-e DEBUG=true \
-e SSH_AUTH_SOCK=$(cat ssh_auth_sock) \
-v "$(cat ssh_auth_sock):$(cat ssh_auth_sock)" \
-v $PWD/pull-secret:/opt/crc/pull-secret:z \
-v $PWD:/data:z \
quay.io/crcont/crc-${{inputs.qe-type}}:gh-linux-arm64 \
Expand Down

0 comments on commit 0ce2c33

Please sign in to comment.