I’m trying to use the BUILD_BALENA_MACHINE_NAME parameter in my Dockerfile.template and in my CMakefile.txt:
FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:bionic-build
ENV BUILD_BALENA_MACHINE_NAME=%%BUILD_BALENA_MACHINE_NAME%%
and in CMakeLists.txt
...
if( $ENV{BUILD_BALENA_MACHINE_NAME} STREQUAL "intel-nuc")
...
but now I’m getting:
git push balena
Enumerating objects: 118, done.
Counting objects: 100% (118/118), done.
Delta compression using up to 4 threads
Compressing objects: 100% (91/91), done.
Writing objects: 100% (91/91), 28.00 KiB | 2.00 MiB/s, done.
Total 91 (delta 72), reused 0 (delta 0)
[Info] Starting build for rv-camera-rpi3b, user oldmacdonald
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1514854/devices
[Error] Could not detect project type: Service camera: BUILD_BALENA_MACHINE_NAME is not defined
[Error] Not deploying release.
remote: error: hook declined to update refs/heads/master
To git.balena-cloud.com:oldmacdonald/rv-camera-rpi3b.git
! [remote rejected] master-> master (hook declined)
error: failed to push some refs to 'oldmacdonald@git.balena-cloud.com:oldmacdonald/rv-camera-rpi3b.git'
How did I break my app?