You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/09/18 08:42:45 UTC
[airflow] branch main updated: Fix breeze failing breeze on missing
docker config (#18330)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 87e9865 Fix breeze failing breeze on missing docker config (#18330)
87e9865 is described below
commit 87e98652d58198e4ef7146bdc7e1e8d87a7d2bae
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sat Sep 18 10:42:31 2021 +0200
Fix breeze failing breeze on missing docker config (#18330)
---
scripts/ci/libraries/_build_images.sh | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/scripts/ci/libraries/_build_images.sh b/scripts/ci/libraries/_build_images.sh
index 3e1aabc..270d71b 100644
--- a/scripts/ci/libraries/_build_images.sh
+++ b/scripts/ci/libraries/_build_images.sh
@@ -432,9 +432,18 @@ function build_images::configure_docker_registry() {
else
verbosity::print_info "Skip Login to GitHub Registry ${GITHUB_REGISTRY} as token is missing"
fi
- local new_config
- new_config=$(jq '.experimental = "enabled"' "${HOME}/.docker/config.json")
- echo "${new_config}" > "${HOME}/.docker/config.json"
+ if [[ ${CI} == "true" ]]; then
+ # we only need that on CI in order to run "docker manifest" when we check if remote image exists
+ # See function push_pull_remove_images::check_image_manifest()
+ local new_config
+ new_config=$(jq '.experimental = "enabled"' "${HOME}/.docker/config.json" || true)
+ if [[ ${new_config} != "" ]]; then
+ echo "${new_config}" > "${HOME}/.docker/config.json"
+ else
+ echo "${COLOR_YELLOW}Could not set experimental flag in ${HOME}/.docker/config.json ${COLOR_RESET}"
+ echo "${COLOR_YELLOW}docker manifest command will likely not work${COLOR_RESET}"
+ fi
+ fi
}