Location of the source in a Google Cloud Source Repository.
JSON representation
{"projectId": string,"repoName": string,"dir": string,"invertRegex": boolean,"substitutions": {string: string,...},// Union field revision can be only one of the following:"branchName": string,"tagName": string,"commitSha": string// End of list of possible types for union field revision.}
Fields
projectId
string
Optional. ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
repoName
string
Required. Name of the Cloud Source Repository.
dir
string
Optional. Directory, relative to the source root, in which to run the build.
This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution.
invertRegex
boolean
Optional. Only trigger a build if the revision regex does NOT match the revision regex.
substitutions
map (key: string, value: string)
Optional. Substitutions to use in a triggered build. Should only be used with triggers.run
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Union field revision. A revision within the Cloud Source Repository must be specified in one of these ways. revision can be only one of the following:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-17 UTC."],[[["\u003cp\u003eThe content details the JSON representation of a source repository, including the project ID, repository name, and directory for build execution.\u003c/p\u003e\n"],["\u003cp\u003eOptional fields like \u003ccode\u003einvertRegex\u003c/code\u003e allow for builds to be triggered only if the revision regex does not match, offering flexibility in build conditions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esubstitutions\u003c/code\u003e field supports a key-value map for build-time parameter customization.\u003c/p\u003e\n"],["\u003cp\u003eA revision within the source repository can be specified using one of three methods, either a \u003ccode\u003ebranchName\u003c/code\u003e, a \u003ccode\u003etagName\u003c/code\u003e or a specific \u003ccode\u003ecommitSha\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe syntax for both \u003ccode\u003ebranchName\u003c/code\u003e and \u003ccode\u003etagName\u003c/code\u003e fields are regex compliant using the RE2 library.\u003c/p\u003e\n"]]],[],null,[]]