-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google container builder task cannot find gcloud #68
Comments
VSTS does not maintain the path environment variable between task executions. You have to tell VSTS to carry the path forward. The Google Cloud SDK-Tool Installer Task does this for you. If you want to use your own script, you have to output to the console a command to prepend the path:
|
@ILMTitan Thanks for your reply. I used the Google SDK Tool installer task as the first step and later used the container builder task as the second step. In this case too gcloud could not be found. |
These were two steps in the same build on the same build agent? Could you show me the build logs for, at a minimum, the Tool Installer task? |
@ILMTitan you are right the usage of the goolge sdk tool installer task prepends the path to the vso[task.prependpath] variable Logs from Google cloud sdk installer task
When I try to use the installed gcloud in step2 container builder task Logs from Google container builder task
I do not clearly understand why the gcloud command failed. I do not face this issue when I run this pipeline of two steps on a Hosted VS2017 agent. I notice this issue of gcloud command failing when I use linux preview agent. May be I am missing out on something. |
@ILMTitan any pointers on what could be wrong in my settings ? thanks |
That log shows the path to gcloud was found, and that a reasonable command was executed. It looks like any error output from gcloud is being swallowed. Are any builds showing up in your Cloud Build Console? |
@ILMTitan gcloud is found in the PATH when I use the google sdk installer however the container builder task fails with no information on the error. There are no builds reaching the Google Cloud builder service. I have checked the logs on GCP and I do not see any traces of the build request. I suppose the build is failing inside vsts even before reaching GCP. As I mentioned earlier the same set of vsts tasks work perfectly fine on Hosted VS2017 agent but they fail on Hosted Linux preview agent. |
@ILMTitan I am trying to debug locally by running a vsts agent and registering the agent inside a queue. I tried to manually exec into the running docker vsts agent
When I run this command manually inside a running container, the build is getting submitted to google cloud container builder service. The same command when it runs from a vsts build pipeline it fails with I also tried to update the vsts service account key with the same key as myserviceaccountkey.json in the command above. Is there a way to debug and see why it fails only from a vsts build pipeline ? |
@ILMTitan any updates ? thanks |
@VarunkumarManohar What happens if you run the same command using the Gcloud Command Task?
|
@ILMTitan When I try to use the gcloud command task I on hosted linux agent I see: This however works fine on windows agent |
Allow scripts to access the OAuth token was set to true |
I am using the vsts google container builder task inside my build pipeline.
I am running this task on a Hosted Linux preview vsts agent.
The container builder task fails to find gcloud on the agent machine.
I also tried installing gcloud on the agent using the installer and adding gcloud to the PATH
Container builder tasks fails to find gcloud.
The text was updated successfully, but these errors were encountered: