From 49b8daf56c7209bc486c6d790d131630bb849b06 Mon Sep 17 00:00:00 2001 From: mpromonet Date: Fri, 7 Feb 2020 00:46:00 +0100 Subject: [PATCH] fix docker build in circleci --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index de62cbbc..69dc8cea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -248,6 +248,8 @@ jobs: publish_docker_linuxarm32v7: machine: image: circleci/classic:201808-01 + environment: + CROSSCOMPILER: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%209.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-9.2.0-pi_2-3.tar.gz steps: - checkout - run: git submodule update --init @@ -255,7 +257,7 @@ jobs: command: | export TAG=${CIRCLE_TAG:-circle-latest} docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS - docker build --build-arg ARCH=armv7l --build-arg CROSSCOMPILER=https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/GCC%209.1.0/Raspberry%20Pi%202%2C%203/cross-gcc-9.1.0-pi_2-3.tar.gz --build-arg IMAGE=balenalib/raspberry-pi2 --pull -t $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v7 -f Dockerfile.rpi . + docker build --build-arg ARCH=armv7l --build-arg CROSSCOMPILER=${CROSSCOMPILER} --build-arg IMAGE=balenalib/raspberry-pi2 --pull -t $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v7 -f Dockerfile.rpi . docker push $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v7 # ------------------------------------- @@ -264,6 +266,8 @@ jobs: publish_docker_linuxarm32v6: machine: image: circleci/classic:201808-01 + environment: + CROSSCOMPILER: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%209.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-9.2.0-pi_0-1.tar.gz steps: - checkout - run: git submodule update --init @@ -271,7 +275,7 @@ jobs: command: | export TAG=${CIRCLE_TAG:-circle-latest} docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS - docker build --pull -t $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v6 -f Dockerfile.rpi . + docker build --build-arg CROSSCOMPILER=${CROSSCOMPILER} --pull -t $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v6 -f Dockerfile.rpi . docker push $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME:${TAG}-arm32v6 # -------------------------------------