Skip to content

use ssh to send image instead of http to avoid timeouts #4503

use ssh to send image instead of http to avoid timeouts

use ssh to send image instead of http to avoid timeouts #4503

Workflow file for this run

name: Flowzone
on:
pull_request:
types: [opened, synchronize, closed]
branches: [main, master]
# allow external contributions to use secrets within trusted code
pull_request_target:
types: [opened, synchronize, closed]
branches: [main, master]
jobs:
flowzone:
name: Flowzone
uses: product-os/flowzone/.github/workflows/flowzone.yml@master
# prevent duplicate workflows and only allow one `pull_request` or `pull_request_target` for
# internal or external contributions respectively
if: |
(github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request') ||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')
secrets: inherit
e2e:
needs: [flowzone]
if: |
((github.event.pull_request.head.repo.full_name == github.repository && github.event_name == 'pull_request') ||
(github.event.pull_request.head.repo.full_name != github.repository && github.event_name == 'pull_request_target')) &&
github.event.action != 'closed'
runs-on: ubuntu-22.04
env:
SUITES: ./suites
REPORTS: ./reports
WORKSPACE: ./workspace
LEVIATHAN_ROOT: ./
BALENACLOUD_ORG: testbot
BALENACLOUD_APP_NAME: balena/testbot-rig
QEMU_CPUS: 1
QEMU_MEMORY: 1G
WORKER_TYPE: ${{ matrix.WORKER_TYPE }}
DEVICE_TYPE: ${{ matrix.DEVICE_TYPE }}
defaults:
run:
working-directory: .
shell: bash --noprofile --norc -eo pipefail -x {0}
strategy:
fail-fast: false
matrix:
include:
- DEVICE_TYPE: genericx86-64-ext
WORKER_TYPE: qemu
ENVIRONMENT_URL: balena-cloud.com
- DEVICE_TYPE: generic-amd64
WORKER_TYPE: qemu
ENVIRONMENT_URL: balena-cloud.com
- DEVICE_TYPE: generic-aarch64
WORKER_TYPE: qemu
ENVIRONMENT_URL: bm.balena-dev.com
- DEVICE_TYPE: raspberrypi3
WORKER_TYPE: testbot
ENVIRONMENT_URL: bm.balena-dev.com
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
submodules: true
- name: Setup env variables for BalenaCloud
if: matrix.ENVIRONMENT_URL == 'balena-cloud.com'
run: |
echo "BALENACLOUD_API_KEY=${{ secrets.BALENA_TOKEN }}" >> $GITHUB_ENV
echo "BALENACLOUD_API_URL=${{ matrix.ENVIRONMENT_URL }}" >> $GITHUB_ENV
- name: Setup env variables for BalenaCloud
if: matrix.ENVIRONMENT_URL == 'bm.balena-dev.com'
run: |
echo "BALENACLOUD_API_KEY=${{ secrets.BALENAMACHINE_API_KEY }}" >> $GITHUB_ENV
echo "BALENACLOUD_API_URL=${{ matrix.ENVIRONMENT_URL }}" >> $GITHUB_ENV
echo "BALENACLOUD_SSH_URL=ssh.devices.${{ matrix.ENVIRONMENT_URL }}" >> $GITHUB_ENV
echo "BALENACLOUD_SSH_PORT=222" >> $GITHUB_ENV
- name: Copy suite config
run: cp -a ${{ env.SUITES }}/config.js ${{ env.WORKSPACE }}/config.js
- name: Leviathan build + test
uses: ./
env:
BALENACLOUD_API_KEY: ${{ env.BALENACLOUD_API_KEY }}
BALENACLOUD_API_URL: ${{ env.BALENACLOUD_API_URL }}
BALENACLOUD_APP_NAME: ${{ env.BALENACLOUD_APP_NAME }}
BALENACLOUD_ORG: ${{ env.BALENACLOUD_ORG }}
BALENACLOUD_SSH_PORT: ${{ env.BALENACLOUD_SSH_PORT }}
BALENACLOUD_SSH_URL: ${{ env.BALENACLOUD_SSH_URL }}
DEVICE_TYPE: ${{ matrix.DEVICE_TYPE }}
LEVIATHAN_ROOT: ${{ env.LEVIATHAN_ROOT }}
QEMU_CPUS: 1
QEMU_MEMORY: "1G"
REPORTS: ${{ env.REPORTS }}
SUITES: ${{ env.SUITES }}
WORKER_TYPE: ${{ matrix.WORKER_TYPE }}
WORKSPACE: ${{ env.WORKSPACE }}
TEST_SUITE: e2e