Bitwise DEVS
Bitwise DEVS

Reputation: 3469

GCloud with Jenkins - gcloud command is not working

I am following this documentation and I was able to work on almost all of it except the last part where Jenkins will execute a GCloud command after app Gradle build is complete and generates a debug apk.

enter image description here

I can execute GCloud commands with default console anywhere since its environment path was set during initial installation, but Jenkins although running locally cannot execute GCloud commands.

enter image description here

This is the error of the workspace

enter image description here

UPDATE

I move the build command from "Execute shell" to "Execute Windows batch command" but still cannot recognize

'gcloud' is not recognized as an internal or external command,
operable program or batch file.

I read already numerous SO related question but none of it works on me, one is by changing Jenkins service Log On but I cannot start it after doing that.

enter image description here

Upvotes: 1

Views: 601

Answers (1)

Pankaj K
Pankaj K

Reputation: 351

I am unable to see the images due to org restrictions so ignore me if you have already done this..

  • check if gcloud is installed properly
  • set the path to gcloud in your PATH variable for Linux machine
  • set 'environment variables on windows machine.. I have set these on my machine..

CLOUDSDK_PYTHON = path to working python exe

GCLOUD_HOME = folder where gcloud relates exe files are stored

I hope this solves your problem.

Upvotes: 1

Related Questions