|
| 1 | +name: Testing Farm test |
| 2 | +on: |
| 3 | + pull_request: {} |
| 4 | + |
| 5 | +jobs: |
| 6 | + tests: |
| 7 | + runs-on: [self-hosted, linux, testing-farm] |
| 8 | + strategy: |
| 9 | + fail-fast: false |
| 10 | + matrix: |
| 11 | + go: ['1.21'] |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + - name: Set up Go |
| 15 | + uses: actions/setup-go@v5 |
| 16 | + with: |
| 17 | + go-version: ${{ matrix.go }} |
| 18 | + - name: prepare env |
| 19 | + run: | |
| 20 | + sudo yum install podman openssh-server git make -y |
| 21 | + ssh-keygen -t rsa -N '' -f id_rsa -q |
| 22 | + - name: reserve machine from testing farm |
| 23 | + env: |
| 24 | + TESTING_FARM_API_TOKEN: ${{ secrets.TESTING_FARM_API_TOKEN }} |
| 25 | + run: | |
| 26 | + export TESTING_FARM_API_TOKEN="$env:TESTING_FARM_API_TOKEN" |
| 27 | + eval $(ssh-agent) |
| 28 | + testing-farm reserve --compose Fedora-40-aarch64 --arch aarch64 --ssh-public-key id_rsa.pub --no-autoconnect | tee info |
| 29 | + machine=`tail -n 1 info` |
| 30 | + echo ${machine##*@} > host |
| 31 | + echo "root" > username |
| 32 | + #ssh -o StrictHostKeyChecking=no -i id_rsa root@$host |
| 33 | + - name: build CRC installer |
| 34 | + run: | |
| 35 | + mkdir -p crc/custom_embedded |
| 36 | + cd crc |
| 37 | + make linux-release CUSTOM_EMBED=true EMBED_DOWNLOAD_DIR=custom_embedded |
| 38 | + ls custom_embedded |
| 39 | + - name: install CRC in the resevered machine |
| 40 | + run: | |
| 41 | + podman run --rm -d --name crc-linux-install \ |
| 42 | + -e TARGET_HOST=$(cat host) \ |
| 43 | + -e TARGET_HOST_USERNAME=$(cat username) \ |
| 44 | + -e TARGET_HOST_KEY_PATH=id_rsa \ |
| 45 | + -e TARGET_FOLDER=crc-support \ |
| 46 | + -e TARGET_CLEANUP='false' \ |
| 47 | + -e OUTPUT_FOLDER=/data \ |
| 48 | + -e DEBUG='true' \ |
| 49 | + -v ${PWD}:/data:z \ |
| 50 | + -v ${PWD}/crc-windows-installer.zip:/opt/crc-support/crc-windows-installer.zip:z \ |
| 51 | + quay.io/rhqp/crc-support:v0.5-linux crc-support/run.ps1 \ |
| 52 | + -targetPath "/Users/$(cat username)/crc-support" \ |
| 53 | + -download 'false' \ |
| 54 | + -install 'true' \ |
| 55 | + -forceFresh 'false' |
| 56 | + podman logs -f crc-win-support |
| 57 | +
|
0 commit comments