You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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 :
name: GCP Actions
- 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 !