From 7c9f76db632b3487e67f76bd124e94e43f298915 Mon Sep 17 00:00:00 2001 From: Sergei Silnov Date: Fri, 11 Sep 2020 16:14:15 +0200 Subject: [PATCH] ci: Use git mirror for docker image --- tools/ci/config/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ci/config/build.yml b/tools/ci/config/build.yml index 0c644001f2..1870975e33 100644 --- a/tools/ci/config/build.yml +++ b/tools/ci/config/build.yml @@ -276,7 +276,10 @@ build_docker: DOCKER_TMP_IMAGE_NAME: "idf_tmp_image" before_script: [] script: - - export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" + - export LOCAL_CI_REPOSITORY_URL=$CI_REPOSITORY_URL + - if [ -n "$LOCAL_GITLAB_HTTPS_HOST" ]; then export LOCAL_CI_REPOSITORY_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@${LOCAL_GITLAB_HTTPS_HOST}/${CI_PROJECT_PATH}"; fi + - echo "Using repository at $LOCAL_CI_REPOSITORY_URL" + - export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${LOCAL_CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA}" # Build - docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/ # We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.