Files
probe/.woodpecker.yaml
CI System 1741f667a6
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
ClearGrow Probe CI / Build Development Firmware (push) Has been cancelled
ClearGrow Probe CI / Build Production Firmware (push) Has been cancelled
ClearGrow Probe CI / CI Status Summary (push) Has been cancelled
Release Build / Build and Release Firmware (push) Has been cancelled
Fix Woodpecker pipeline: pass APP_DIR env to nrfutil subshell
Environment variables aren't inherited by the nrfutil launch subshell.
Pass APP_DIR=$(pwd) on the command line so it's available in the build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 20:53:35 -07:00

69 lines
2.6 KiB
YAML

# ClearGrow Probe - Zephyr/nRF Connect SDK Build Pipeline
# Triggers on push to any branch, pull requests, and tags
#
# The nordicplayground/nrfconnect-sdk image requires running commands through
# nrfutil toolchain-manager launch to have west and the toolchain available.
# The SDK is pre-installed at /workdir in the image.
when:
- event: [push, pull_request, tag]
steps:
- name: build
image: nordicplayground/nrfconnect-sdk:v2.6-branch
commands:
- echo "=== ClearGrow Probe Build ==="
- 'echo "Commit: ${CI_COMMIT_SHA}"'
- 'echo "Branch: ${CI_COMMIT_BRANCH}"'
- 'echo "Tag: ${CI_COMMIT_TAG}"'
- echo ""
# Save the current workspace path for use inside nrfutil launch
- export APP_DIR=$(pwd)
- 'echo "App directory: $APP_DIR"'
- echo ""
# Run west through nrfutil toolchain-manager launch
- 'nrfutil toolchain-manager launch /bin/bash -- -c "west --version"'
- echo ""
# Build the firmware - the SDK workspace is at /workdir, our app is in current dir
# Pass the app directory path to the subshell explicitly
- 'APP_DIR=$(pwd) nrfutil toolchain-manager launch /bin/bash -- -c "cd /workdir && west build -b nrf52840dk_nrf52840 -d /tmp/build $APP_DIR -- -DEXTRA_CONF_FILE=prj.conf"'
- echo ""
- echo "=== Build successful ==="
- echo ""
- 'echo "Binary sizes:"'
- ls -lh /tmp/build/zephyr/zephyr.* 2>/dev/null || true
# Copy artifacts to release directory
- mkdir -p release
- cp /tmp/build/zephyr/zephyr.hex release/cleargrow-probe-${CI_COMMIT_TAG:-dev}.hex 2>/dev/null || true
- cp /tmp/build/zephyr/zephyr.bin release/cleargrow-probe-${CI_COMMIT_TAG:-dev}.bin 2>/dev/null || true
- name: release
image: quay.io/thegeeklab/wp-gitea-release
when:
- event: tag
settings:
base_url: https://git.cleargrow.io
api_key:
from_secret: gitea_release_token
files:
- release/*.hex
- release/*.bin
title: "Probe Firmware ${CI_COMMIT_TAG}"
note: |
## ClearGrow Probe Firmware ${CI_COMMIT_TAG}
Firmware release for the nRF52840 wireless sensor probe.
### Files
- `cleargrow-probe-${CI_COMMIT_TAG}.hex` - Intel HEX format (for J-Link/nRF Connect)
- `cleargrow-probe-${CI_COMMIT_TAG}.bin` - Raw binary (for DFU updates)
### Flashing
```bash
# Using nrfjprog
nrfjprog --program cleargrow-probe-${CI_COMMIT_TAG}.hex --chiperase --verify --reset
# Using west
west flash --hex-file cleargrow-probe-${CI_COMMIT_TAG}.hex
```