Hello ,
I am building and deploying my app from Jenkins , but it fails if I use service account to authenticate ( and it deploys successfully when using my account).
Here are the steps that I follow :
- Created new service account on project tradeos-test1 (with edit permission )
- Google Cloud Container builder API is under enabled APIs
- The jenkins job execute the following command successfully
gcloud auth activate-service-account --key-file mykey.json
- Then I execute the following command to deploy
mvn gcloud:deploy -Dgcloud.gcloud_project=tradeos-test1 -Dgcloud.version=v10
The last command fails with the following error :
[INFO] ERROR: Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied."
[INFO] ERROR: Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied."
[INFO] ERROR: Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied."
[INFO] ERROR: Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied."
[INFO] ERROR: Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied."
.
.
.
[INFO] Beginning teardown of remote build environment (this may take a few seconds).
[INFO] ERROR: gcloud crashed (Error): Unable to push the image to the registry: "Error: Status 403 trying to push repository gcloud/tradeos-test1.default.freightos-daily-build: "Access denied.""
please check the attached file for full logs ( error at the end of the file)
Please note that everything is working fine when using my account
Thanks
Tareq