Configuring the GitHub to Pipelines client connection
Use the procedures on this page to control the connection between your GitHub repository and the optional Pipelines command-line client. If you prefer to use your web browser to connect Cloud Platform to GitHub, see Connecting an application to an external Git repo.
Requirements
To configure the Pipelines client integration with GitHub (both to connect and disconnect), you must have the following items:
To configure the Pipelines client to use a GitHub repository as the source, run the pipelinesgithub-connect command as a user with the necessary GitHub permission for the GitHub repository.
[GitHubuser/GitHubrepo-name] is your GitHub user name and the name of the GitHub repository that will be the source repository for build jobs. You can find this in GitHub by selecting the repository and looking in the URL bar or on the repository’s main page.
After you have run pipelinesgithub-connect, the GitHub repository that you specify in pipelinesgithub-connect becomes the default source repository for Pipelines build jobs.
Each time that you use GitHub to create or reopen a pull request, push a commit, or push a tag, Cloud Platform runs the pipelinesstart command using the build definition file in the GitHub repository, and commits the build artifact to your Cloud Platform repository.
GitHub webhooks and deploy keys
When you run pipelinesgithub-connect, the Pipelines client adds a webhook to your GitHub repository.
To view the webhook in GitHub:
Go to your repository, and click Settings.
In the menu on the left side, click Webhooks.
The Pipelines client also creates a deploy key in your GitHub repository, which gives the client permission to interact with your repository.
To see the deploy key in GitHub:
Go to your repository, and click Settings.
In the menu on the left side, click Deploy keys.
Disconnecting from GitHub
To disconnect the Pipelines client from a GitHub repository, run the following command:
[GitHubuser/GitHubrepo-name] is your GitHub user name and the name of the GitHub repository that is the source repository for build jobs. You can find this in GitHub by selecting the repository and looking in the URL bar or on the repository’s main page.
Disconnecting your GitHub repository from the Pipelines client also removes the webhook and deploy key added by the connection of the two services.
Configuring the GitHub to Pipelines client connection
Use the procedures on this page to control the connection between your GitHub repository and the optional Pipelines command-line client. If you prefer to use your web browser to connect Cloud Platform to GitHub, see Connecting an application to an external Git repo.
Requirements
To configure the Pipelines client integration with GitHub (both to connect and disconnect), you must have the following items:
To configure the Pipelines client to use a GitHub repository as the source, run the pipelinesgithub-connect command as a user with the necessary GitHub permission for the GitHub repository.
[GitHubuser/GitHubrepo-name] is your GitHub user name and the name of the GitHub repository that will be the source repository for build jobs. You can find this in GitHub by selecting the repository and looking in the URL bar or on the repository’s main page.
After you have run pipelinesgithub-connect, the GitHub repository that you specify in pipelinesgithub-connect becomes the default source repository for Pipelines build jobs.
Each time that you use GitHub to create or reopen a pull request, push a commit, or push a tag, Cloud Platform runs the pipelinesstart command using the build definition file in the GitHub repository, and commits the build artifact to your Cloud Platform repository.
GitHub webhooks and deploy keys
When you run pipelinesgithub-connect, the Pipelines client adds a webhook to your GitHub repository.
To view the webhook in GitHub:
Go to your repository, and click Settings.
In the menu on the left side, click Webhooks.
The Pipelines client also creates a deploy key in your GitHub repository, which gives the client permission to interact with your repository.
To see the deploy key in GitHub:
Go to your repository, and click Settings.
In the menu on the left side, click Deploy keys.
Disconnecting from GitHub
To disconnect the Pipelines client from a GitHub repository, run the following command:
[GitHubuser/GitHubrepo-name] is your GitHub user name and the name of the GitHub repository that is the source repository for build jobs. You can find this in GitHub by selecting the repository and looking in the URL bar or on the repository’s main page.