This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 7512344582888106d46fb871ecd9804d2c706f6b
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Nov 2 22:00:51 2020 +0100

    Uses DOCKER_TAG when building image in DockerHub (#12050)
    
    DockerHub uses `hooks/build` to build the image and it passes
    DOCKER_TAG variable when the script is called.
    
    This PR makes the DOCKER_TAG to provide the default valuei for tag
    that is calculated from sources (taking the default branch and
    python version). Since it is only set in the DockerHub build, it
    should be safe.
    
    Fixes #11937
    
    (cherry picked from commit 5c199fbddfaf9f83915e84225313169a0486c3a6)
---
 scripts/ci/libraries/_build_images.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/ci/libraries/_build_images.sh 
b/scripts/ci/libraries/_build_images.sh
index 444fff9..387372a 100644
--- a/scripts/ci/libraries/_build_images.sh
+++ b/scripts/ci/libraries/_build_images.sh
@@ -327,7 +327,7 @@ function build_images::get_docker_image_names() {
     export PYTHON_BASE_IMAGE="python:${PYTHON_BASE_IMAGE_VERSION}-slim-buster"
 
     # CI image base tag
-    export 
AIRFLOW_CI_BASE_TAG="${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-ci"
+    export 
AIRFLOW_CI_BASE_TAG="${DOCKER_TAG=${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}-ci}"
 
     # CI image to build
     export 
AIRFLOW_CI_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_CI_BASE_TAG}"
@@ -336,7 +336,7 @@ function build_images::get_docker_image_names() {
     export 
AIRFLOW_CI_IMAGE_DEFAULT="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${BRANCH_NAME}-ci"
 
     # Base production image tag - used to build kubernetes tag as well
-    export 
AIRFLOW_PROD_BASE_TAG="${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}"
+    export 
AIRFLOW_PROD_BASE_TAG="${DOCKER_TAG=${BRANCH_NAME}-python${PYTHON_MAJOR_MINOR_VERSION}}"
 
     # PROD image to build
     export 
AIRFLOW_PROD_IMAGE="${DOCKERHUB_USER}/${DOCKERHUB_REPO}:${AIRFLOW_PROD_BASE_TAG}"

Reply via email to