Build hangs (?) when installing Google Cloud SDK


#1

I’m trying to download the Google Cloud SDK in one of my scripts and it seems to be causing some issues. In my dependency step, I run a bash file with sudo -E /bin/sh ./shell/install-deps.sh. In that script, I have the following line (the recommended install method when you need to do deployment on linux):

curl https://sdk.cloud.google.com | bash

The script gets a few steps into the process before seemingly stalling. Locally, this script doesn’t really have any issues, but it seems to have some here. It will sit like that for several minutes, and reloading the page actually causes some log information to get lost (in the UI at least). Before timing out, the logs indicate it only gets to downloading the sdk scripts and creating the directory but never gets any further.

Installing Google Cloud SDK...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100   421    0   421    0     0   6353      0 --:--:-- --:--:-- --:--:--  9790
Downloading Google Cloud SDK install script: https://dl.google.com/dl/cloudsdk/channels/rapid/install_google_cloud_sdk.bash

######################################################################## 100.0%
Running install script from: /tmp/tmp.6sVKRinztG/install_google_cloud_sdk.bash
which curl
curl -# -f https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz

######################################################################## 100.0%


Installation directory (this will create a google-cloud-sdk subdirectory) (/home/ubuntu/My-Repository):

#2

Are you able to SSH into the build and try this step manually to see if it is getting stuck?


#3

You know what, I’m gonna bet that is waiting for input. Which it doesn’t do locally. I will ssh in and investigate. Likely not an issue on your end (hopefully)


#4

They seem to have tweaked the script for install. For anyone else who may hit this, add the environment variable CLOUDSDK_CORE_DISABLE_PROMPTS and set it to 1. Bypasses all user input


#5

Awesome! Glad you got this to work, thanks for posting the solution :slight_smile:


#6