ci: Set BR2_DL_DIR & BR2_CCACHE_DIR
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
diff --git a/ci/build-all-defconfigs.sh b/ci/build-all-defconfigs.sh
index f8b1cd4..92db788 100755
--- a/ci/build-all-defconfigs.sh
+++ b/ci/build-all-defconfigs.sh
@@ -30,6 +30,11 @@
shopt -s expand_aliases
source op-build-env
+if [ -n "$DL_DIR" ]; then
+ unset BR2_DL_DIR
+ export BR2_DL_DIR=${DL_DIR}
+fi
+
for i in ${DEFCONFIGS[@]}; do
op-build $i
echo 'BR2_CCACHE=y' >> output/.config
diff --git a/ci/build.sh b/ci/build.sh
index 45da32c..4291414 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -88,6 +88,12 @@
PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
fi
fi
+ if [[ -n "DL_DIR" ]]; then
+ DL_DIR_ENV="ENV DL_DIR $DL_DIR"
+ fi
+ if [[ -n "CCACHE_DIR" ]]; then
+ CCACHE_DIR_ENV="ENV CCACHE_DIR $CCACHE_DIR"
+ fi
Dockerfile=$(head -n1 $base_dockerfile; echo ${PROXY}; tail -n +2 $base_dockerfile; cat << EOF
${PROXY}
@@ -95,6 +101,8 @@
ENV HOME ${HOME}
${HTTP_PROXY_ENV}
${HTTPS_PROXY_ENV}
+${DL_DIR_ENV}
+${CCACHE_DIR_ENV}
EOF
)
$DOCKER_PREFIX docker build --network=host -t openpower/op-build-$distro - <<< "${Dockerfile}"