mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:11:57 +00:00
136 lines
5.4 KiB
JSON
136 lines
5.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "perforce.schema.json#",
|
|
"title": "PerforceConnection",
|
|
"description": "Configuration for a connection to Perforce Server.",
|
|
"allowComments": true,
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["p4.port", "p4.user", "p4.passwd"],
|
|
"properties": {
|
|
"p4.port": {
|
|
"description": "The Perforce Server address to be used for p4 CLI (P4PORT).",
|
|
"type": "string",
|
|
"examples": ["ssl:111.222.333.444:1666"]
|
|
},
|
|
"p4.user": {
|
|
"description": "The user to be authenticated for p4 CLI (P4USER).",
|
|
"type": "string",
|
|
"examples": ["admin"]
|
|
},
|
|
"p4.passwd": {
|
|
"description": "The ticket value for the user (P4PASSWD). You can get this by running `p4 login -p` or `p4 login -pa`. It should look like `6211C5E719EDE6925855039E8F5CC3D2`.",
|
|
"type": "string"
|
|
},
|
|
"p4.client": {
|
|
"description": "Client specified as an option for p4 CLI (P4CLIENT, also enables '--use-client-spec')",
|
|
"type": "string"
|
|
},
|
|
"depots": {
|
|
"description": "Depots can have arbitrary paths, e.g. a path to depot root or a subdirectory.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"pattern": "^\\/[\\/\\S]+\\/$"
|
|
},
|
|
"examples": [["//Sourcegraph/", "//Engineering/Cloud/"]]
|
|
},
|
|
"maxChanges": {
|
|
"description": "Only import at most n changes when possible (git p4 clone --max-changes).",
|
|
"type": "number",
|
|
"default": 1000,
|
|
"minimum": 1
|
|
},
|
|
"authorization": {
|
|
"title": "PerforceAuthorization",
|
|
"description": "If non-null, enforces Perforce depot permissions.",
|
|
"type": "object",
|
|
"properties": {
|
|
"subRepoPermissions": {
|
|
"description": "Experimental: infer sub-repository permissions from protection rules.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"ignoreRulesWithHost": {
|
|
"description": "Ignore host-based protection rules (any rule with something other than a wildcard in the Host field).",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
},
|
|
"repositoryPathPattern": {
|
|
"description": "The pattern used to generate the corresponding Sourcegraph repository name for a Perforce depot. In the pattern, the variable \"{depot}\" is replaced with the Perforce depot's path.\n\nFor example, if your Perforce depot path is \"//Sourcegraph/\" and your Sourcegraph URL is https://src.example.com, then a repositoryPathPattern of \"perforce/{depot}\" would mean that the Perforce depot is available on Sourcegraph at https://src.example.com/perforce/Sourcegraph.\n\nIt is important that the Sourcegraph repository name generated with this pattern be unique to this Perforce Server. If different Perforce Servers generate repository names that collide, Sourcegraph's behavior is undefined.",
|
|
"type": "string",
|
|
"default": "{depot}"
|
|
},
|
|
"fusionClient": {
|
|
"type": "object",
|
|
"description": "Configuration for the experimental p4-fusion client",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"enabled": {
|
|
"description": "DEPRECATED. p4-fusion is always enabled.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"networkThreads": {
|
|
"description": "The number of threads in the threadpool for running network calls. Defaults to the number of logical CPUs.",
|
|
"type": "integer",
|
|
"default": 12,
|
|
"minimum": 1
|
|
},
|
|
"networkThreadsFetch": {
|
|
"description": "The number of threads in the threadpool for running network calls when performing fetches. Defaults to the number of logical CPUs.",
|
|
"type": "integer",
|
|
"default": 12,
|
|
"minimum": 1
|
|
},
|
|
"printBatch": {
|
|
"description": "The p4 print batch size",
|
|
"type": "integer",
|
|
"default": 100,
|
|
"minimum": 1
|
|
},
|
|
"retries": {
|
|
"description": "How many times a command should be retried before the process exits in a failure",
|
|
"type": "integer",
|
|
"default": 10,
|
|
"minimum": 1
|
|
},
|
|
"refresh": {
|
|
"description": "How many times a connection should be reused before it is refreshed",
|
|
"type": "integer",
|
|
"default": 1000,
|
|
"minimum": 1
|
|
},
|
|
"lookAhead": {
|
|
"description": "How many CLs in the future, at most, shall we keep downloaded by the time it is to commit them",
|
|
"type": "integer",
|
|
"default": 2000,
|
|
"minimum": 1
|
|
},
|
|
"maxChanges": {
|
|
"description": "How many changes to fetch during initial clone. The default of -1 will fetch all known changes",
|
|
"type": "integer",
|
|
"default": -1
|
|
},
|
|
"includeBinaries": {
|
|
"description": "Whether to include binary files",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"fsyncEnable": {
|
|
"description": " Enable fsync() while writing objects to disk to ensure they get written to permanent storage immediately instead of being cached. This is to mitigate data loss in events of hardware failure.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"noConvertLabels": {
|
|
"description": "Disable Perforce label to git tag conversion.",
|
|
"type": "boolean",
|
|
"default": false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|