Skip to content

Commit f62b090

Browse files
authored
update gcloud install commands, fix failure fpr extension install helm / gcloud, repair full_build pipeline (#153)
1 parent 2b53f66 commit f62b090

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

template.d/13_binaries

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ RUN if [ -n "${BINARIES}" ]; then \
4646
| tail -n1 \
4747
| cut -d '-' -f1 \
4848
) && \
49-
BINARY_PACKAGE_FILENAME="$(echo ${BINARY_PACKAGE} | cut -d '=' -f1)-${BINARY_PACKAGE_VERSION}-linux-x86_64.tar.gz" && \
49+
if [ "${BINARY_PACKAGE}" = "google-cloud-cli" ]; then \
50+
BINARY_PACKAGE_FILENAME="google-cloud-cli-${BINARY_PACKAGE_VERSION}-linux-x86_64.tar.gz"; \
51+
else \
52+
BINARY_PACKAGE_FILENAME="$(echo ${BINARY_PACKAGE} | cut -d '=' -f1)-${BINARY_PACKAGE_VERSION}-linux-x86_64.tar.gz"; \
53+
fi && \
5054
BINARY_PACKAGE_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${BINARY_PACKAGE_FILENAME}" && \
5155
\
5256
mkdir -p ./google && \
5357
curl -SsL --retry 5 "${BINARY_PACKAGE_URL}" | tar xz -C ./google && \
54-
chmod -R +x ./google/* && \
55-
sh ./google/*/install.sh --quiet --command-completion true --bash-completion true --path-update true; \
58+
./google/google-cloud-sdk/install.sh --quiet --usage-reporting false --command-completion true --path-update true && \
59+
cp -r ./google/google-cloud-sdk /usr/local/lib/ && \
60+
ln -s /usr/local/lib/google-cloud-sdk/bin/* /usr/local/bin/ && \
61+
rm -rf ./google; \
5662
done; \
5763
fi; \
5864
done; \

template.d/22_extensions

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ RUN if [ -n "${EXTENSIONS}" ]; then \
1717
if [ "${EXT}" = "GOOGLE" ]; then \
1818
for EXTENSION_EXT in ${EXTENSIONS_EXT[@]}; \
1919
do \
20-
./google/*/bin/gcloud components install "${EXTENSION_EXT}" && \
21-
"${EXTENSION_EXT//.*=/gcloud components update --version }"; \
20+
gcloud components install "${EXTENSION_EXT}" && \
21+
if [[ "${EXTENSION_EXT}" == *"="* ]]; then \
22+
gcloud components update --version "${EXTENSION_EXT#*=}"; \
23+
fi; \
2224
done; \
2325
fi && \
2426
\
2527
if [ "${EXT}" = "HELM" ]; then \
2628
for EXTENSION_EXT in ${EXTENSIONS_EXT[@]}; \
2729
do \
28-
helm plugin install "${EXTENSION_EXT//=/ --version}"; \
30+
helm plugin install "${EXTENSION_EXT//=/ --version}" --verify=false; \
2931
done; \
3032
fi; \
3133
done \

0 commit comments

Comments
 (0)