diff --git a/Dockerfile.ci b/Dockerfile.ci index 39061ab61917a6..e9f21627241dc3 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -1271,6 +1271,7 @@ EOF # The content below is automatically copied from scripts/docker/install_npm_pnpm_yarn.sh COPY <<"EOF" /install_npm_pnpm_yarn.sh #!/usr/bin/env bash + . "$( dirname "${BASH_SOURCE[0]}" )/common.sh" function install_npm_pnpm_yarn() { @@ -1518,9 +1519,9 @@ ENV AIRFLOW_PRE_CACHED_YARN_PACKAGES=${AIRFLOW_PRE_CACHED_YARN_PACKAGES} COPY --from=scripts install_yarn_dependencies_from_branch_tip.sh /scripts/docker/ ENV YARN_CACHE_DIR="${AIRFLOW_SOURCES}/.yarn-cache" -RUN mkdir -p "${YARN_CACHE_DIR}" # We are installing Yarn dependencies here to make sure they are cached in the layer -RUN if [[ ${AIRFLOW_PRE_CACHED_YARN_PACKAGES} == "true" ]]; then \ +RUN mkdir -p "${YARN_CACHE_DIR}" && \ + if [[ ${AIRFLOW_PRE_CACHED_YARN_PACKAGES} == "true" ]]; then \ bash /scripts/docker/install_yarn_dependencies_from_branch_tip.sh; \ fi @@ -1530,9 +1531,9 @@ ENV AIRFLOW_PRE_CACHED_PNPM_PACKAGES=${AIRFLOW_PRE_CACHED_PNPM_PACKAGES} COPY --from=scripts install_pnpm_dependencies_from_branch_tip.sh /scripts/docker/ ENV PNPM_CACHE_DIR="${AIRFLOW_SOURCES}/.pnpm-cache" -RUN mkdir -p "${PNPM_CACHE_DIR}" # We are installing pnpm dependencies here to make sure they are cached in the layer -RUN if [[ ${AIRFLOW_PRE_CACHED_PNPM_PACKAGES} == "true" ]]; then \ +RUN mkdir -p "${PNPM_CACHE_DIR}" && \ + if [[ ${AIRFLOW_PRE_CACHED_PNPM_PACKAGES} == "true" ]]; then \ bash /scripts/docker/install_pnpm_dependencies_from_branch_tip.sh; \ fi diff --git a/scripts/docker/install_npm_pnpm_yarn.sh b/scripts/docker/install_npm_pnpm_yarn.sh index 6356fbbb1093cc..0c1e555bd96833 100644 --- a/scripts/docker/install_npm_pnpm_yarn.sh +++ b/scripts/docker/install_npm_pnpm_yarn.sh @@ -16,6 +16,7 @@ # specific language governing permissions and limitations # under the License. # shellcheck shell=bash disable=SC2086 + # shellcheck source=scripts/docker/common.sh . "$( dirname "${BASH_SOURCE[0]}" )/common.sh"