1OC SET(1) June 2016 OC SET(1)
2
3
4
6 oc set build-hook - Update a build hook on a build config
7
8
9
11 oc set build-hook [OPTIONS]
12
13
14
16 Set or remove a build hook on a build config
17
18
19 Build hooks allow behavior to be injected into the build process.
20
21
22 A post-commit build hook is executed after a build has committed an im‐
23 age but before the image has been pushed to a registry. It can be used
24 to execute tests on the image and verify it before it is made available
25 in a registry or for any other logic that is needed to execute before
26 the image is pushed to the registry. A new container with the recently
27 built image is launched with the build hook command. If the command or
28 script run by the build hook returns a non-zero exit code, the result‐
29 ing image will not be pushed to the registry.
30
31
32 The command for a build hook may be specified as a shell script (with
33 the --script argument), as a new entrypoint command on the image with
34 the --command argument, or as a set of arguments to the image's entry‐
35 point (default).
36
37
38
40 --all=false
41 If true, select all build configs in the namespace
42
43
44 --allow-missing-template-keys=true
45 If true, ignore any errors in templates when a field or map key is
46 missing in the template. Only applies to golang and jsonpath output
47 formats.
48
49
50 --command=false
51 If true, set the entrypoint of the hook container to the given com‐
52 mand
53
54
55 --dry-run=false
56 If true, only print the object that would be sent, without sending
57 it.
58
59
60 -f, --filename=[]
61 Filename, directory, or URL to files to use to edit the resource
62
63
64 --local=false
65 If true, set image will NOT contact api-server but run locally.
66
67
68 -o, --output=""
69 Output format. One of: json|yaml|name|go-template-file|template‐
70 file|template|go-template|jsonpath|jsonpath-file.
71
72
73 --post-commit=false
74 If true, set the post-commit build hook on a build config
75
76
77 -R, --recursive=false
78 Process the directory used in -f, --filename recursively. Useful
79 when you want to manage related manifests organized within the same di‐
80 rectory.
81
82
83 --remove=false
84 If true, remove the build hook.
85
86
87 --script=""
88 Specify a script to run for the build-hook
89
90
91 -l, --selector=""
92 Selector (label query) to filter build configs
93
94
95 --template=""
96 Template string or path to template file to use when -o=go-tem‐
97 plate, -o=go-template-file. The template format is golang templates [
98 ⟨http://golang.org/pkg/text/template/#pkg-overview⟩].
99
100
101
103 --allow_verification_with_non_compliant_keys=false
104 Allow a SignatureVerifier to use keys which are technically
105 non-compliant with RFC6962.
106
107
108 --alsologtostderr=false
109 log to standard error as well as files
110
111
112 --application_metrics_count_limit=100
113 Max number of application metrics to store (per container)
114
115
116 --as=""
117 Username to impersonate for the operation
118
119
120 --as-group=[]
121 Group to impersonate for the operation, this flag can be repeated
122 to specify multiple groups.
123
124
125 --azure-container-registry-config=""
126 Path to the file containing Azure container registry configuration
127 information.
128
129
130 --boot_id_file="/proc/sys/kernel/random/boot_id"
131 Comma-separated list of files to check for boot-id. Use the first
132 one that exists.
133
134
135 --cache-dir="/builddir/.kube/http-cache"
136 Default HTTP cache directory
137
138
139 --certificate-authority=""
140 Path to a cert file for the certificate authority
141
142
143 --client-certificate=""
144 Path to a client certificate file for TLS
145
146
147 --client-key=""
148 Path to a client key file for TLS
149
150
151 --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
152 CIDRs opened in GCE firewall for LB traffic proxy health checks
153
154
155 --cluster=""
156 The name of the kubeconfig cluster to use
157
158
159 --container_hints="/etc/cadvisor/container_hints.json"
160 location of the container hints file
161
162
163 --containerd="unix:///var/run/containerd.sock"
164 containerd endpoint
165
166
167 --context=""
168 The name of the kubeconfig context to use
169
170
171 --default-not-ready-toleration-seconds=300
172 Indicates the tolerationSeconds of the toleration for
173 notReady:NoExecute that is added by default to every pod that does not
174 already have such a toleration.
175
176
177 --default-unreachable-toleration-seconds=300
178 Indicates the tolerationSeconds of the toleration for unreach‐
179 able:NoExecute that is added by default to every pod that does not al‐
180 ready have such a toleration.
181
182
183 --docker="unix:///var/run/docker.sock"
184 docker endpoint
185
186
187 --docker-tls=false
188 use TLS to connect to docker
189
190
191 --docker-tls-ca="ca.pem"
192 path to trusted CA
193
194
195 --docker-tls-cert="cert.pem"
196 path to client certificate
197
198
199 --docker-tls-key="key.pem"
200 path to private key
201
202
203 --docker_env_metadata_whitelist=""
204 a comma-separated list of environment variable keys that needs to
205 be collected for docker containers
206
207
208 --docker_only=false
209 Only report docker containers in addition to root stats
210
211
212 --docker_root="/var/lib/docker"
213 DEPRECATED: docker root is read from docker info (this is a fall‐
214 back, default: /var/lib/docker)
215
216
217 --enable_load_reader=false
218 Whether to enable cpu load reader
219
220
221 --event_storage_age_limit="default=24h"
222 Max length of time for which to store events (per type). Value is a
223 comma separated list of key values, where the keys are event types
224 (e.g.: creation, oom) or "default" and the value is a duration. Default
225 is applied to all non-specified event types
226
227
228 --event_storage_event_limit="default=100000"
229 Max number of events to store (per type). Value is a comma sepa‐
230 rated list of key values, where the keys are event types (e.g.: cre‐
231 ation, oom) or "default" and the value is an integer. Default is ap‐
232 plied to all non-specified event types
233
234
235 --global_housekeeping_interval=0
236 Interval between global housekeepings
237
238
239 --housekeeping_interval=0
240 Interval between container housekeepings
241
242
243 --insecure-skip-tls-verify=false
244 If true, the server's certificate will not be checked for validity.
245 This will make your HTTPS connections insecure
246
247
248 --kubeconfig=""
249 Path to the kubeconfig file to use for CLI requests.
250
251
252 --log-flush-frequency=0
253 Maximum number of seconds between log flushes
254
255
256 --log_backtrace_at=:0
257 when logging hits line file:N, emit a stack trace
258
259
260 --log_cadvisor_usage=false
261 Whether to log the usage of the cAdvisor container
262
263
264 --log_dir=""
265 If non-empty, write log files in this directory
266
267
268 --logtostderr=true
269 log to standard error instead of files
270
271
272 --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
273 Comma-separated list of files to check for machine-id. Use the
274 first one that exists.
275
276
277 --match-server-version=false
278 Require server version to match client version
279
280
281 -n, --namespace=""
282 If present, the namespace scope for this CLI request
283
284
285 --request-timeout="0"
286 The length of time to wait before giving up on a single server re‐
287 quest. Non-zero values should contain a corresponding time unit (e.g.
288 1s, 2m, 3h). A value of zero means don't timeout requests.
289
290
291 -s, --server=""
292 The address and port of the Kubernetes API server
293
294
295 --stderrthreshold=2
296 logs at or above this threshold go to stderr
297
298
299 --storage_driver_buffer_duration=0
300 Writes in the storage driver will be buffered for this duration,
301 and committed to the non memory backends as a single transaction
302
303
304 --storage_driver_db="cadvisor"
305 database name
306
307
308 --storage_driver_host="localhost:8086"
309 database host:port
310
311
312 --storage_driver_password="root"
313 database password
314
315
316 --storage_driver_secure=false
317 use secure connection with database
318
319
320 --storage_driver_table="stats"
321 table name
322
323
324 --storage_driver_user="root"
325 database username
326
327
328 --token=""
329 Bearer token for authentication to the API server
330
331
332 --user=""
333 The name of the kubeconfig user to use
334
335
336 -v, --v=0
337 log level for V logs
338
339
340 --version=false
341 Print version information and quit
342
343
344 --vmodule=
345 comma-separated list of pattern=N settings for file-filtered log‐
346 ging
347
348
349
351 # Clear post-commit hook on a build config
352 oc set build-hook bc/mybuild --post-commit --remove
353
354 # Set the post-commit hook to execute a test suite using a new entrypoint
355 oc set build-hook bc/mybuild --post-commit --command -- /bin/bash -c /var/lib/test-image.sh
356
357 # Set the post-commit hook to execute a shell script
358 oc set build-hook bc/mybuild --post-commit --script="/var/lib/test-image.sh param1 param2 /var/lib/done.sh"
359
360 # Set the post-commit hook as a set of arguments to the default image entrypoint
361 oc set build-hook bc/mybuild --post-commit -- arg1 arg2
362
363
364
365
367 oc-set(1),
368
369
370
372 June 2016, Ported from the Kubernetes man-doc generator
373
374
375
376Openshift Openshift CLI User Manuals OC SET(1)