Status Update
Comments
sn...@google.com <sn...@google.com>
sn...@google.com <sn...@google.com> #2
sn...@google.com <sn...@google.com> #3
I have forwarded this request to the GCB engineering team to evaluate it further. The public can indicate interest by "starring" this thread to increase general awareness and participation level. But I cannot guarantee if or when it would be implemented, but stay tuned here for further updates.
sa...@gmail.com <sa...@gmail.com> #4
am...@hughes.com <am...@hughes.com> #5
Any ETA for this fix ?
hi...@gmail.com <hi...@gmail.com> #6
2nd attempt: I granted the cloud build service account "cloud build service account" , "source repository reader" roles in the source repo in another project then executed the gcloud command to add a trigger:
$ gcloud beta builds triggers create cloud-source-repositories --repo=tcsplayground/usbank/master// --branch-pattern=".*" --build-config="cloudbuild.yaml" I used format [PROJECT_ID]/[REPO]/+[BRANCH]: but all failed. I can't seem to get the repo fully qualified identifier right.
3rd attempt: use the following URL to create a trigger in projectA to connect to cloud source repo-1 in projectB:
all attempts failed. I suspect build triggers connecting to a cloud source repo in another project is a missing feature.
ar...@archaeo.biz <ar...@archaeo.biz> #7
It looks like projectId inside
ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
Steps to reproduce:
- create repo-1 inside project-1
- create repo-2 inside project-2
- grant
roles/source.reader
(or evenroles/owner
) to project-1 accounts inside project-2 project IAM permissions:
serviceAccount:${project_number.project-1}@cloudbuild.gserviceaccount.com
serviceAccount:service-${project_number.project-1}@sourcerepo-service-accounts.iam.gserviceaccount.com
serviceAccount:service-${project_number.project-1}@gcp-sa-cloudbuild.iam.gserviceaccount.com
serviceAccount:${project_number.project-1}@cloudservices.gserviceaccount.com
- run commands
gcloud beta builds triggers create cloud-source-repositories --trigger-config project-2-repo-1-trigger.json --project project-1
gcloud beta builds triggers create cloud-source-repositories --trigger-config project-2-repo-2-trigger.json --project project-1
with content
project-2-repo-1-trigger.json:
{
"description": "project-2-repo-1-trigger",
"disabled": true,
"filename": "cloudbuild.yaml",
"name": "project-2-repo-1-trigger",
"triggerTemplate": {
"branchName": "^master$",
"projectId": "repo-2",
"repoName": "repo-1"
}
}
project-2-repo-2-trigger.json:
{
"description": "project-2-repo-2-trigger",
"disabled": true,
"filename": "cloudbuild.yaml",
"name": "project-2-repo-2-trigger",
"triggerTemplate": {
"branchName": "^master$",
"projectId": "repo-2",
"repoName": "repo-2"
}
}
Expected outcome:
- project-2-repo-1-trigger fails, because repo-1 does not exist in project-2 (only in project-1)
- project-2-repo-2-trigger succeeds (repo-2 exists in project-2)
Actual outcome:
- project-2-repo-1-trigger succeeds (ignoring projectId field and using local repo-1 instead)
- project-2-repo-2-trigger fails (ignoring projectId field and looking for repo-2 locally, which does not exist)
This looks more like a bug than a feature request, at least according to API specs.
an...@tryon.technology <an...@tryon.technology> #8
I am wondering if there are any updates on this ticket?
We are experiencing the same issue. By adding a trigger template for source repo from another project, the Cloud Build Trigger UI shows a warning that there is no repo or we don't have access to it.
We would like to clarify: What is the behaviour of projectId field in triggerTemplate. How it should be used?
th...@telepass.com <th...@telepass.com> #9
Same issue here! Do you have any news or a roadmap about it?
Thank you very much,
Thomas
al...@poli.ufrj.br <al...@poli.ufrj.br> #10
Makes no sense sepparating projects between dev / prd if you cant use same repo when building your CI/CD pipeline with Cloud Build and Cloud Source!
Any news when this feature is comming?
la...@gmail.com <la...@gmail.com> #11
I'm experiencing the same issue here!
Do you have any updates on this ticket?
Thanks,
Lawrence
de...@plusserver.com <de...@plusserver.com> #12
same issue for us. It would be great to have the possibility to trigger repositorys from other projects.
As this issue has been open for some time now: Is there possibly a workaround i am missing?
Best regards
Marcel
jr...@gmail.com <jr...@gmail.com> #13
st...@gmail.com <st...@gmail.com> #14
[Deleted User] <[Deleted User]> #15
Is there any progress on it ? We are implementing CICD pipelines using Cloud build and it works in case of External repo like Github Bitbucket connectivity. I wonder why Google repo service does not provide such functionality!
I think Cloud Repos should be under organization tenant, not under project; to make it accessible across all projects of organization.
Regards,
Usama Bin Masood
[Deleted User] <[Deleted User]> #16
de...@google.com <de...@google.com>
ba...@google.com <ba...@google.com>
gc...@timantrob.us <gc...@timantrob.us> #17
It appears that there has been some recent activity on this specific issue which is very welcome.
I would also vote for this feature of cross-project CSR access for Cloud Build triggers. From my perspective having repos under the organisation may present problems for a multi-tenant managed services scenario where you would want access to repos scoped to within specific folders for example. However, the basic principle of having a GCB trigger in one project leverage a CSR repo in a different project - obviously secured with the appropriate IAM permissions - would be super useful.
dm...@gmail.com <dm...@gmail.com> #18
mr...@gmail.com <mr...@gmail.com> #19
ku...@ibm.com <ku...@ibm.com> #20
de...@kraftheinz.com <de...@kraftheinz.com> #21
Any update on this thread please ?
ma...@gmail.com <ma...@gmail.com> #22
ds...@q6cyber.com <ds...@q6cyber.com> #23
We want to be able to share a single repository to our dev and prod projects.
[Deleted User] <[Deleted User]> #24
ch...@gmail.com <ch...@gmail.com> #25
[Deleted User] <[Deleted User]> #26
bg...@symbiotic.com <bg...@symbiotic.com> #27
Any update on this thread please?
va...@google.com <va...@google.com>
su...@google.com <su...@google.com>
ba...@google.com <ba...@google.com>
su...@google.com <su...@google.com> #28
Hello,
We have an update from the Engineering team.As of now the team has recommended that users can consider using GitHub, GitHub Enterprise, or Bitbucket Server. If there are feature gaps which prevent Users from moving to the native integration (including lack of GA-level support for GitLab.com, GitLab Enterprise Edition, or Bitbucket Cloud), we'd request users to raise feature requests to be filed outlining the specific needs.
Thank you for your trust and continued support to improve Google Cloud Platform products.
Description
What you would like to accomplish:
I would like to create cloud build trigger that will use source repository commit from other project in the same organization.
How this might work:
Eg. I have Project A and project B
1. I give cloud-build service account from project A cloud-build service role in project B
2. I create cloud build trigger in project A which points to branch in google source repo in project B
3. When I push to that branch in project B a build in project A triggers and does what I describe in cloud-build.yaml
An alternative would be having some sort of source repositories sharing
If applicable, reasons why alternative solutions are not sufficient:
Having builds in project B that runs actions on project A is a hack not a propper solution.
Having to separate remotes one for project A one for project B is too high risk that someone pushes code to the wrong remote.
Other information (workarounds you have tried, documentation consulted, etc):
We currently have all cloud builds in project A to deploy to projects A and B