Why does a git push on any Project trigger a build

2019-05-23 03:58发布

问题:

I want to enable the Google Cloud Build Github App in several Github projects.

  1. So on the Google Cloud Build Github App, I click on grant this app access to your GitHub account

  1. Then on the following screen, I install Google Cloud Build on All repositories.

  1. Then I'm redirecting to a couple of Google Authorization screens.

  2. Then I endup on the Google following screen, where I select an existing Google project-id then accept the consent screen.

The issue is: a git push on any of my Github repo triggers a build in this google project-id (and not on his related Google project-id)

Of course I want

  • a push in Github project#1 to trigger a build in Google Cloud Build project#1
  • a push in Github project#2 to trigger a build in Google Cloud Build project#2

回答1:

I believe that's because the app works on the Account level and not on the project level.



回答2:

There is now an "Add another project" button that allows you to connect repositories directly to different projects when setting up the Google Cloud Build connection.

See this screenshot: