Jenkins pipeline integrate with GKE

Hi All,
While trying to creating a pipeline script for integrating with GitHub that is working. but, the step-2 where I tried to write a script for integrating with docker to build the image and push it to google artifact registry.

Can anyone of you please assist for the same? would be really helpful.

Thanks in advance

Hello mallipeddib,
you have to log in first to gcr. you can use gcloud command in your pipeline itself or on the Jenkins server, then tag your image with YOUR-REGISTRY/image-name:tag check these useful links Authentication methods  |  Container Registry documentation  |  Google Cloud, and Using Docker with Pipeline

@ [Ayman],

It’s a google artifact registry(GAR) not gcr, can you please assist me accordingly. Thanks