I have Jenkins installed on GCE VM (Debian) on project xxxx.
I need to deploy a cloud function with source in Google cloud repository to project yyyy. I do it successfully from the shell of Jenkins VM. In order to deploy a function from pipeline I did follow: 1. Create a service account in yyyy project. 2. Upload the key (json file) to VM. 3. 4. Define pipeline: 5. pipeline { agent any stages { stage('Build') { steps { sh 'gcloud auth activate-service-account yyyy...@yyyy.iam.gservice account.com --key-file jenkins-test.json' sh ''' gcloud functions deploy helloWorld --region=us-central1 --runtime nodejs8 --trigger-http --project yyyy \ --source https://source.developers.google.com/projects/xxxx/repos/test1/moveable-aliases/master/paths/HelloWorld/ ''' I have no access to the source repository in the project xxxx. OperationError: code=7, message=Failed to retrieve function source code. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3c156400-f0a8-4bfa-b55b-e3a0b6b21905%40googlegroups.com.