CI-HW #63
This file contains 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: CI-HW | |
concurrency: | |
group: ci-hw-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
inputs: | |
keep: | |
type: boolean | |
description: "Don't exit when done" | |
required: false | |
default: false | |
skip_ready: | |
type: boolean | |
description: "Skip ready checks" | |
required: false | |
default: false | |
debug_enabled: | |
type: boolean | |
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
required: false | |
default: false | |
jobs: | |
hlab: | |
runs-on: hlab | |
timeout-minutes: 600 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- fabricmode: spine-leaf | |
includeonie: true | |
buildmode: iso | |
steps: | |
- name: Runner host | |
run: | | |
echo "$KUBE_NODE" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Checkout lab-ci repository | |
uses: actions/checkout@v4 | |
with: | |
repository: githedgehog/lab-ci | |
path: './lab-ci' | |
- 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: | | |
source "./lab-ci/envs/$KUBE_NODE/source.sh" | |
bin/hhfab init -v --dev --include-onie=${{ matrix.includeonie }} -w "./lab-ci/envs/$KUBE_NODE/wiring.yaml" | |
bin/hhfab vlab up -v --ready switch-reinstall --ready inspect ${{ inputs.skip_ready && '' || '--ready setup-vpcs --ready test-connectivity' }} ${{ inputs.keep && '' || '--ready exit' }} --mode=${{ matrix.buildmode }} | |
- name: Upload show-tech artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: show-tech-hlab-${{ matrix.fabricmode }}-${{ matrix.includeonie }}-${{ matrix.buildmode }} | |
path: show-tech-output | |
- 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-hlab-${{ 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: 600 | |
with: | |
limit-access-to-actor: true |