VLAB Burner #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: VLAB Burner | |
concurrency: | |
group: vlab-burner-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
required: false | |
default: false | |
runner: | |
type: choice | |
description: "VLAB runner to burn" | |
required: true | |
options: | |
- run-1.l | |
- run-2.l | |
- run-3.l | |
- run-4.l | |
jobs: | |
vlab: | |
runs-on: vlab | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
fabricmode: | |
- spine-leaf | |
includeonie: | |
- false | |
buildmode: | |
- manual | |
multiplier1: | |
- 0 | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
- 5 | |
- 6 | |
- 7 | |
- 8 | |
- 9 | |
multiplier2: | |
- 0 | |
- 1 | |
- 2 | |
- 3 | |
- 4 | |
- 5 | |
- 6 | |
- 7 | |
- 8 | |
- 9 | |
steps: | |
- name: Chek runner host | |
id: runner | |
run: | | |
echo "$KUBE_NODE" | |
if [[ "$KUBE_NODE" == "${{ inputs.runner }}" ]]; then | |
exit 0 | |
else | |
exit 1 | |
fi | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
cache: true | |
- name: Setup local registry | |
run: | | |
just --timestamp _localreg & | |
- name: Build hhfab | |
run: | | |
just --timestamp oci_repo=127.0.0.1:30000 oci=http push | |
- name: hhfab init and vlab up | |
env: | |
HHFAB_REG_REPO: 127.0.0.1:30000 | |
HHFAB_VLAB_COLLECT: true | |
run: | | |
bin/hhfab init -v --dev -m ${{ matrix.fabricmode }} --include-onie=${{ matrix.includeonie }} | |
bin/hhfab vlab gen -v | |
bin/hhfab vlab up -v --ready inspect --ready setup-vpcs --ready test-connectivity --ready exit --mode=${{ matrix.buildmode }} | |
- name: Dump local registry logs | |
if: ${{ always() }} | |
run: | | |
cat .zot/log | |
- name: Upload show-tech artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: show-tech-vlab-${{ matrix.fabricmode }}-${{ matrix.includeonie }}-${{ matrix.buildmode }} | |
path: show-tech-output | |
- name: Setup tmate session for debug | |
if: ${{ failure() && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 30 | |
with: | |
limit-access-to-actor: true |