jenkinsci / jenkinsci/google-compute-engine-plugin

Support for using Images from other projects

Open
#182 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
58
Forks
97
PR merge metrics
No merged PRs in 30d

Description

I just found this https://github.com/jenkinsci/google-compute-engine-plugin/issues/95 that I'm not 100% sure whether it's related to.

### Current GCP design and Jenkins UI setup

- Service account: `jenkins-gce` for the projectID `jenkins`.
- ProjectID with the images: `images-prod`.
- Besides of the required roles, the abovementioned service account got the `computeImageUser` role for the `images-prod` project.
- `gcloud compute images list --project images-prod` returns the list of images as expected.
- The list of Image Name fields under the "Boot Disk" in the Jenkins UI is populated as expected.

### What error do I see?

When configuring the Google Cloud setup in the Jenkins UI with one of those images from the shared project then, there are some errors `Error retrieving`

![image](https://user-images.githubusercontent.com/2871786/72971002-b6510680-3dc0-11ea-841a-28ebea9eaad8.png)

And the Jenkins logs show something like the below stacktrace:

```
2020-01-22 21:25:02.330+0000 [id=44] WARNING c.g.j.p.c.ComputeEngineCloud#provision: Error provisioning node
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Required 'compute.instances.list' permission for 'projects/images-prod'",
"reason" : "forbidden"
} ],
"message" : "Required 'compute.instances.list' permission for 'projects/images-prod'"
}
```

### What do I expect?

GCP projects were configured based on the [using-images-from-other-projects-for-vm-instances](https://cloud.google.com/deployment-manager/docs/configuration/using-images-from-other-projects-for-vm-instances) docs. What I'd like to get is the possibility to configure the plugin using Images from Other Projects.

Please let me know if you need further details, or whether this issue should be converged with the abovementioned one.

Thanks so much

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.