mik-laj commented on a change in pull request #9219:
URL: https://github.com/apache/airflow/pull/9219#discussion_r438477694
##########
File path: scripts/ci/prepare_tool_scripts.sh
##########
@@ -59,9 +68,60 @@
GCLOUD_IMAGE="gcr.io/google.com/cloudsdktool/cloud-sdk:latest"
prepare_tool_script "amazon/aws-cli:latest" ".aws" aws
prepare_tool_script "mcr.microsoft.com/azure-cli:latest" ".azure" az az
-prepare_tool_script "${GCLOUD_IMAGE}" ".config/gcloud" bq bq
-prepare_tool_script "${GCLOUD_IMAGE}" ".config/gcloud" gcloud gcloud
-prepare_tool_script "${GCLOUD_IMAGE}" ".config/gcloud" gsutil gsutil
+
+function prepare_gcloud_script() {
+ IMAGE="${1}"
+ TOOL="${2}"
+ COMMAND="${2}"
+ VOLUME=".config/gcloud"
+
+ TARGET_TOOL_PATH="/usr/bin/${TOOL}"
+ TARGET_TOOL_UPDATE_PATH="/usr/bin/${TOOL}-update"
+
+ cat >"${TARGET_TOOL_PATH}" <<EOF
+#!/usr/bin/env bash
+
+DOCKER_ARGS=(
+ --rm \\
+ -v "\${HOST_AIRFLOW_SOURCES}/tmp:/tmp" \\
+ -v "\${HOST_AIRFLOW_SOURCES}/files:/files" \\
+ -v "\${HOST_AIRFLOW_SOURCES}:/opt/airflow" \\
+ -v "\${HOST_HOME}/${VOLUME}:/root/${VOLUME}" \\
+ -e GOOGLE_APPLICATION_CREDENTIALS \\
+ -e CLOUDSDK_CONFIG \\
Review comment:
Agree. I simplified scripts. Now we have one common script instead 7 * 2
+ 1 = 15 scripts - https://github.com/apache/airflow/pull/9223/files
We still keep the old behavior.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]