You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Override configuration at the User Environment level. May be overridden by P4CONFIG or P4ENVIRO files.
51
44
52
-
```yaml
53
-
steps:
54
-
plugins:
55
-
- improbable-eng/perforce:
56
-
stream: //dev/minimal
57
-
```
45
+
See [p4 set](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_set.html?Highlight=precedence) for more on system variables and precedence.
46
+
47
+
#### `stream` (optional, string)
48
+
49
+
Which p4 stream to sync, e.g. `//dev/minimal`. Can be overridden by `view`.
58
50
59
-
### Partial sync of a stream
51
+
#### `sync` (optional, []string)
52
+
53
+
List of paths to sync, useful when only a subset of files in the clients view are required.
60
54
61
55
```yaml
62
-
steps:
63
-
plugins:
64
-
- improbable-eng/perforce:
65
-
stream: //dev/minimal
66
-
sync:
67
-
- //dev/minimal/.buildkite/...
68
-
- //dev/minimal/scripts/...
56
+
sync:
57
+
- //dev/minimal/.buildkite/...
58
+
- //dev/minimal/scripts/...
69
59
```
70
60
71
-
### Enable parallel sync
61
+
#### `view` (optional, string)
62
+
63
+
Custom workspace view. Must consist of concrete depot paths. Overrides `stream`.
72
64
73
65
```yaml
74
-
steps:
75
-
plugins:
76
-
- improbable-eng/perforce:
77
-
parallel: 16
66
+
view: >-
67
+
//dev/project/... project/...
68
+
//dev/vendor/... vendor/...
78
69
```
79
70
80
-
### Share a stream workspace between pipelines
71
+
### Advanced
72
+
73
+
#### `backup_changelists` (optional, bool)
74
+
75
+
Default: `no`.
76
+
77
+
When running a build against a shelved changelist, create a duplicate of that changelist so that other steps in the build are guaranteed to run against the same version of shelved files.
78
+
79
+
Caveats:
80
+
81
+
* May lead to accumulation of many shelved changelists on the server, affecting performance.
82
+
* Removes convenience of being able to re-shelve changes and iterate by retrying only failied steps.
83
+
84
+
#### `client_options` (optional, string)
81
85
82
-
Useful to avoid syncing duplicate data with large workspaces.
83
-
Only allowed when there is a single buildkite agent running on the machine.
86
+
Default: `clobber`.
87
+
88
+
Additional options for the client workspace, see [Options field](https://www.perforce.com/manuals/cmdref/Content/CmdRef/p4_client.html?#Options2).
84
89
85
90
```yaml
86
-
steps:
87
-
plugins:
88
-
- improbable-eng/perforce:
89
-
stream: //dev/buildkite
90
-
# Sync each stream once
91
-
share_workspace: true
92
-
# Sync once and switch streams in-place (requires share_workspace: true)
93
-
stream_switching: true
91
+
client_options: noclobber nowriteall
94
92
```
95
93
96
-
### Use readonly/partitioned clients
94
+
#### `client_type` (optional, string)
95
+
96
+
Default: `writeable`.
97
97
98
-
Readonly and partitioned client workspaces can be used to reduce impact of automated build systems on Perforce server performance.
98
+
`readonly`and `partitioned` client workspaces can be used to reduce impact of automated build systems on Perforce server performance.
99
99
See related article [Readonly and Partitioned Client Workspaces](https://community.perforce.com/s/article/15372).
100
100
101
-
Note that existing client workspaces must be deleted and re-created to change type.
101
+
Note that `writeable` client workspaces must be deleted and re-created to change to `readonly` or `partitioned` and vice versa.
102
102
103
-
```yaml
104
-
steps:
105
-
plugins:
106
-
- improbable-eng/perforce:
107
-
client_type: partitioned
108
-
```
103
+
Note that `readonly` or `partitioned` workspaces do not appear in the `db.have` table, which prevents them from being used as a revision specifier.
104
+
105
+
This adds a caveat if you wish to re-use workspace data across different machines: the original client which populated that workspace must have been `writeable`.
106
+
107
+
(e.g. If a disk with existing workspace data is attached to a new machine, the plugin will create a new client, read the old workspace name from P4CONFIG and `p4 flush //...@<old-workspace>`. The flush command fails if the old workspace was not of type `writeable`)
108
+
109
+
#### `parallel` (optional, string)
110
+
111
+
Default: `0`(no parallelism)
112
+
113
+
Number of threads to use for parallel sync operations. High values may affect Perforce server performance.
114
+
115
+
#### `share_workspace` (optional, bool)
116
+
117
+
Default: `no`
118
+
119
+
Allow multiple Buildkite pipelines to share each stream-specific client workspace.
120
+
121
+
Useful to avoid syncing duplicate data for large workspaces.
122
+
123
+
Can only be used with stream workspaces and when no more than one buildkite-agent process is running on that machine.
124
+
125
+
#### `stream_switching` (optional, bool)
126
+
127
+
Default: `no`
128
+
129
+
Allows multiple Buildkite pipelines to share a single client workspace, switching streams as required.
0 commit comments