GitLab CI Integration¶
BenchCI integrates hardware testing into CI pipelines.
The CI runner triggers the CLI which submits jobs to a remote agent connected to hardware.
Architecture¶
GitLab Runner
│
▼
BenchCI CLI
│
▼
BenchCI Agent
│
▼
Hardware Device
Required CI Variables¶
Configure these variables:
BENCHCI_LICENSE
BENCHCI_AGENT_URL
BENCHCI_AGENT_TOKEN
Example:
BENCHCI_LICENSE=BCI-XXXXXX
BENCHCI_AGENT_URL=http://bench-machine:8080
BENCHCI_AGENT_TOKEN=secure-token
Example Pipeline¶
Example .gitlab-ci.yml
stages:
- hardware_test
benchci-test:
stage: hardware_test
image: python:3.11
before_script:
- pip install benchci-0.1.0-py3-none-any.whl
script:
- benchci login --license-key "$BENCHCI_LICENSE"
- benchci run -b board.yaml -s suite.yaml -a build/fw.elf --agent "$BENCHCI_AGENT_URL" --token "$BENCHCI_AGENT_TOKEN"
artifacts:
when: always
paths:
- benchci-results/