Running balena build inside travis-ci environment

Hello everyone, I’ve been trying to setup a CI environment on travis for my balena builds. I’ve managed to install balena-cli in travis’ environment, but cannot seem to build with a qemu environment. I’m getting this log with the --debug flag

[debug] new argv=[/home/travis/.nvm/versions/node/v12.21.0/bin/node,/home/travis/build/vivitek/deep-thought/node_modules/.bin/balena,build,--deviceType,raspberrypi3-64,--arch,aarch64,--emulated] length=8
[Debug] Parsing input...
[Debug] Loading project...
[Debug] Resolving project...
[Debug] docker-compose.yml file found at "/home/travis/build/vivitek/deep-thought"
[Debug] Creating project...
[Info] Building for aarch64/raspberrypi3-64
[Build] Building services...
[Build] dhcp Preparing...
[Build] rabbitmq Preparing...
[Build] hotspot Preparing...
[Build] pcap Preparing...
[Build] Built 4 services in 0 seconds
[Error] Build failed.
No such file or directory: /home/travis/.balena/bin
Error: ENOENT: no such file or directory, mkdir '/home/travis/.balena/bin'
For further help or support, visit:
https://www.balena.io/docs/reference/balena-cli/#support-faq-and-troubleshooting

Hi there, without a full Dockerfile it’s difficult to tell what the problem is, but if your RUN command is calling just mkdir '/home/travis/.balena/bin', you might be able to make it work by adding -p (e.g.) mkdir -p '/home/travis/.balena/bin' to create the directory tree.

Thanks for the reply, @ab77 !
That actually unlocked part of a solution for me. If I got this right, the /.balena/bin direcotry is where the qemu “stuff” is stored.

After creating the directory structure with mkdir -p, I also had to set custom permissions on the directory for the “ci” user to access it (was kind of tired, so hit it with a chmod -R 777 :wink: )

And it works!!

Thanks for the feedback