From e4eb27b02b762b90fb58c8432158beb7f22eec92 Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Sat, 3 Oct 2020 12:34:14 +0100 Subject: [PATCH] Breeze: Fix issue with pulling an image via ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Error: ``` ❯ ./breeze --github-image-id 285629517 GitHub image id: 285629517 Force pulling the image, using github registry and skip mounting local sources. This is in order to get the exact same version as used in CI environment for SHA/RUN_ID!. Must provide --username with --password-stdin ``` After the fix from the PR it works fine. ``` ❯ ./breeze --github-image-id 285629517 GitHub image id: 285629517 Force pulling the image, using github registry and skip mounting local sources. This is in order to get the exact same version as used in CI environment for SHA/RUN_ID!. Login Succeeded Force pull base image python:3.6-slim-buster Pulling the image docker.pkg.github.com/apache/airflow/python:3.6-slim-buster-285629517 ``` --- scripts/ci/libraries/_build_images.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh index da6427dd0f01e2..963ae35f1668e0 100644 --- a/scripts/ci/libraries/_build_images.sh +++ b/scripts/ci/libraries/_build_images.sh @@ -352,7 +352,7 @@ function build_images::prepare_ci_build() { if [[ ${USE_GITHUB_REGISTRY} == "true" ]]; then if [[ -n ${GITHUB_TOKEN=} ]]; then echo "${GITHUB_TOKEN}" | docker login \ - --username "${GITHUB_USERNAME}" \ + --username "${GITHUB_USERNAME:-apache}" \ --password-stdin \ "${GITHUB_REGISTRY}" fi