Hello @Aditya Dhatingan !
Thank you for reaching out to the Community!
The maven image you are using in the step is based on Oracle Linux so it does not come with package managers such as yum, apt-get, dnf and apk so this is the reason why you are receiving the error command not found. This error is returned when the program you are trying to execute is not installed in the docker image you are using.
Since your end goal seems to be to use gcloud CLI command, I would suggest using the official Google image google/cloud-sdk that already comes with the CLI tool installed.
Your pipeline step would look like below :
- step:
name: GCP Actions
image: google/cloud-sdk
script:
- echo "Performing GCP Branch specific actions"
- echo "STARTING PUSH"
- git rev-parse HEAD | tee commit.txt
- gcloud auth activate-service-account --key-file=gocomet-deployment-qa-sa.json
With this image, it won't be necessary to manually install gcloud CLI as it already comes with the image. You can also explore other images available in DockerHub.
Hope that helps! Let us know in case you have any questions.
Thank you, @Aditya Dhatingan !
Patrik S
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.