No output when running `gcloud` command
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 378
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 74
Description
Running a `gcloud` command in my build does not produce any output.
Snippet of build script in command block:
```
#!/usr/bin/env bash
echo "Deploying $IMAGE to $ENVIRONMENT"
gcloud compute instances update-container ${INSTANCE} \
--container-image ${IMAGE} \
--container-env-file ${ENV_FILE} \
--zone ${ZONE}
echo "Finished deploying $IMAGE to $ENVIRONMENT"
```
Output in Buildkite web UI:
```
Running script | 50s
| $ ./deploy.sh
| Deploying gcr.io/my-project/image:dev to dev
| Finished deploying gcr.io/my-project/image:dev to dev
```
When I SSH into the agent and run the commands:
```
[buildkite-agent@ip-10-0-1-244 skepsi]$ gcloud compute instances update-container my-dev-instance --container-image gcr.io/my-project/image:dev --container-env-file env-dev --zone australia-southeast1-a
Updating specification of container [my-dev-instance]...done.
Stopping instance [my-dev-instance]...done.
Starting instance [my-dev-instance]...done.
[buildkite-agent@ip-10-0-1-244 skepsi]$
```
My guess is the `gcloud` command is adding a text-based spinner on the end of each line which Buildkite can't pick up?
Contributor guide
Research direction
Start by reproducing the deploy.sh command in a Buildkite job and compare its web UI output with the same gcloud command run over SSH. Investigate how the agent captures command output; done means the gcloud progress lines appear in the Buildkite log while the deployment still completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, google-cloud
- Domain
- ci-cd, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100