diff --git a/docker/Dockerfile.ci_qemu b/docker/Dockerfile.ci_qemu index 9920b1f70e8b..b907ba7b08a9 100644 --- a/docker/Dockerfile.ci_qemu +++ b/docker/Dockerfile.ci_qemu @@ -66,6 +66,11 @@ RUN bash /install/ubuntu_install_zephyr.sh ENV ZEPHYR_BASE=/opt/zephyrproject/zephyr # Arduino deps +# NOTE: override Arduino directories so packages are installed in a +# CI-accessible location. +ENV ARDUINO_DIRECTORIES_DATA=/arduino15-data +ENV ARDUINO_DIRECTORIES_DOWNLOADS=/arduino15-downloads +ENV ARDUINO_DIRECTORIES_USER=/arduino15-user COPY install/ubuntu_install_arduino.sh /install/ubuntu_install_arduino.sh RUN bash /install/ubuntu_install_arduino.sh diff --git a/docker/install/ubuntu_install_arduino.sh b/docker/install/ubuntu_install_arduino.sh index 2b4b8d80fce7..d5c4303f211b 100644 --- a/docker/install/ubuntu_install_arduino.sh +++ b/docker/install/ubuntu_install_arduino.sh @@ -29,3 +29,8 @@ wget -O - https://raw.githubusercontent.com/arduino/arduino-cli/master/install.s # Install supported cores from those URLS arduino-cli core install arduino:mbed_nano arduino-cli core install arduino:sam + +# ARDUINO_DIRECTORIES_USER wouldn't normally be created until we +# install a package, which would casue chmod to fail +mkdir -p "${ARDUINO_DIRECTORIES_DATA}" "${ARDUINO_DIRECTORIES_USER}" "${ARDUINO_DIRECTORIES_DOWNLOADS}" +chmod -R o+rw "${ARDUINO_DIRECTORIES_DATA}" "${ARDUINO_DIRECTORIES_USER}" "${ARDUINO_DIRECTORIES_DOWNLOADS}"