Fix Woodpecker pipeline: pass APP_DIR env to nrfutil subshell
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
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
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>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# 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]
|
||||
@@ -16,20 +17,25 @@ steps:
|
||||
- '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
|
||||
- 'nrfutil toolchain-manager launch /bin/bash -- -c "cd ${CI_WORKSPACE} && west build -b nrf52840dk_nrf52840 -d build . -- -DEXTRA_CONF_FILE=prj.conf"'
|
||||
# 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 ${CI_WORKSPACE}/build/zephyr/zephyr.* 2>/dev/null || true
|
||||
- ls -lh /tmp/build/zephyr/zephyr.* 2>/dev/null || true
|
||||
# Copy artifacts to release directory
|
||||
- mkdir -p ${CI_WORKSPACE}/release
|
||||
- cp ${CI_WORKSPACE}/build/zephyr/zephyr.hex ${CI_WORKSPACE}/release/cleargrow-probe-${CI_COMMIT_TAG:-dev}.hex 2>/dev/null || true
|
||||
- cp ${CI_WORKSPACE}/build/zephyr/zephyr.bin ${CI_WORKSPACE}/release/cleargrow-probe-${CI_COMMIT_TAG:-dev}.bin 2>/dev/null || true
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user