REST Resource: projects.locations.gitLabConfigs

Resource: GitLabConfig

GitLabConfig represents the configuration for a GitLab integration.

JSON representation
{
  "name": string,
  "username": string,
  "secrets": {
    object (GitLabSecrets)
  },
  "createTime": string,
  "webhookKey": string,
  "connectedRepositories": [
    {
      object (GitLabRepositoryId)
    }
  ],
  "enterpriseConfig": {
    object (GitLabEnterpriseConfig)
  }
}
Fields
name

string

The resource name for the config.

username

string

Username of the GitLab.com or GitLab Enterprise account Cloud Build will use.

secrets

object (GitLabSecrets)

Required. Secret Manager secrets needed by the config.

createTime

string (Timestamp format)

Output only. Time when the config was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

webhookKey

string

Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.

connectedRepositories[]

object (GitLabRepositoryId)

Connected GitLab.com or GitLabEnterprise repositories for this config.

enterpriseConfig

object (GitLabEnterpriseConfig)

Optional. GitLabEnterprise config.

GitLabSecrets

GitLabSecrets represents the secrets in Secret Manager for a GitLab integration.

JSON representation
{
  "webhookSecretVersion": string,
  "apiKeyVersion": string,
  "apiAccessTokenVersion": string,
  "readAccessTokenVersion": string
}
Fields
webhookSecretVersion

string

Required. Immutable. The resource name for the webhook secret’s secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another GitLabConfig.

apiKeyVersion

string

Required. Immutable. API Key that will be attached to webhook requests from GitLab to Cloud Build.

apiAccessTokenVersion

string

Required. The resource name for the api access token’s secret version

readAccessTokenVersion

string

Required. The resource name for the read access token’s secret version

GitLabRepositoryId

GitLabRepositoryId identifies a specific repository hosted on GitLab.com or GitLabEnterprise

JSON representation
{
  "id": string,
  "webhookId": integer
}
Fields
id

string

Required. Identifier for the repository. example: "namespace/project-slug", namespace is usually the username or group ID

webhookId

integer

Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.

GitLabEnterpriseConfig

GitLabEnterpriseConfig represents the configuration for a GitLabEnterprise integration.

JSON representation
{
  "hostUri": string,
  "serviceDirectoryConfig": {
    object (ServiceDirectoryConfig)
  },
  "sslCa": string
}
Fields
hostUri

string

Immutable. The URI of the GitlabEnterprise host.

serviceDirectoryConfig

object (ServiceDirectoryConfig)

The Service Directory configuration to be used when reaching out to the GitLab Enterprise instance.

sslCa

string

The SSL certificate to use in requests to GitLab Enterprise instances.

ServiceDirectoryConfig

ServiceDirectoryConfig represents Service Directory configuration for a SCM host connection.

JSON representation
{
  "service": string
}
Fields
service

string

The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.

Methods

create

Creates a new GitLabConfig.

delete

Delete a GitLabConfig.

get

Retrieves a GitLabConfig.

list

List all GitLabConfigs for a given project.

patch

Updates an existing GitLabConfig.

removeGitLabConnectedRepository

Remove a GitLab repository from a given GitLabConfig's connected repositories.