1OC(1)                              June 2016                             OC(1)
2
3
4

NAME

6       oc start-build - Start a new build
7
8
9

SYNOPSIS

11       oc start-build [OPTIONS]
12
13
14

DESCRIPTION

16       Start a build
17
18
19       This command starts a new build for the provided build config or copies
20       an existing build using --from-build= <name>. Pass the --follow flag to
21       see output from the build.
22
23
24       In  addition, you can pass a file, directory, or source code repository
25       with the --from-file, --from-dir, or --from-repo flags directly to  the
26       build. The contents will be streamed to the build and override the cur‐
27       rent build source settings. When using --from-repo, the  --commit  flag
28       can  be  used  to  control  which branch, tag, or commit is sent to the
29       server. If you pass --from-file, the file is placed in the root  of  an
30       empty  directory  with the same filename. It is also possible to pass a
31       http or https url to --from-file and --from-archive, however  authenti‐
32       cation  is  not  supported and in case of https the certificate must be
33       valid and recognized by your system.
34
35
36       Note that builds triggered from binary  input  will  not  preserve  the
37       source  on the server, so rebuilds triggered by base image changes will
38       use the source specified on the build config.
39
40
41

OPTIONS

43       --allow-missing-template-keys=true
44           If true, ignore any errors in templates when a field or map key  is
45       missing  in  the  template.  Only applies to golang and jsonpath output
46       formats.
47
48
49       --build-arg=[]
50           Specify a key-value pair to pass to Docker during the build.
51
52
53       --build-loglevel=""
54           Specify the log level for the build log output
55
56
57       --commit=""
58           Specify the source code commit identifier  the  build  should  use;
59       requires a build based on a Git repository
60
61
62       -e, --env=[]
63           Specify a key-value pair for an environment variable to set for the
64       build container.
65
66
67       -F, --follow=false
68           Start a build and watch its logs until it completes or fails
69
70
71       --from-archive=""
72           An archive (tar, tar.gz, zip) to be extracted before the build  and
73       used as the binary input.
74
75
76       --from-build=""
77           Specify the name of a build which should be re-run
78
79
80       --from-dir=""
81           A directory to archive and use as the binary input for a build.
82
83
84       --from-file=""
85           A  file to use as the binary input for the build; example a pom.xml
86       or Dockerfile. Will be the only file in the build source.
87
88
89       --from-repo=""
90           The path to a local source code repository to  use  as  the  binary
91       input for a build.
92
93
94       --from-webhook=""
95           Specify a generic webhook URL for an existing build config to trig‐
96       ger
97
98
99       --git-post-receive=""
100           The contents of the post-receive hook to trigger a build
101
102
103       --git-repository=""
104           The path to the git repository for post-receive;  defaults  to  the
105       current directory
106
107
108       --incremental=false
109           Overrides  the  incremental  setting  in  a  source-strategy build,
110       ignored if not specified
111
112
113       --list-webhooks=""
114           List the webhooks for the specified build config or build;  accepts
115       'all', 'generic', or 'github'
116
117
118       --no-cache=false
119           Overrides  the  noCache setting in a docker-strategy build, ignored
120       if not specified
121
122
123       -o, --output=""
124           Output format. One of:  json|yaml|name|template|go-template|go-tem‐
125       plate-file|templatefile|jsonpath|jsonpath-file.
126
127
128       --template=""
129           Template  string  or  path  to template file to use when -o=go-tem‐
130       plate, -o=go-template-file. The template format is golang  templates  [
131http://golang.org/pkg/text/template/#pkg-overview⟩].
132
133
134       -w, --wait=false
135           Wait  for  a build to complete and exit with a non-zero return code
136       if the build fails
137
138
139

OPTIONS INHERITED FROM PARENT COMMANDS

141       --allow_verification_with_non_compliant_keys=false
142           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
143       non-compliant with RFC6962.
144
145
146       --alsologtostderr=false
147           log to standard error as well as files
148
149
150       --application_metrics_count_limit=100
151           Max number of application metrics to store (per container)
152
153
154       --as=""
155           Username to impersonate for the operation
156
157
158       --as-group=[]
159           Group  to  impersonate for the operation, this flag can be repeated
160       to specify multiple groups.
161
162
163       --azure-container-registry-config=""
164           Path to the file containing Azure container registry  configuration
165       information.
166
167
168       --boot_id_file="/proc/sys/kernel/random/boot_id"
169           Comma-separated  list  of files to check for boot-id. Use the first
170       one that exists.
171
172
173       --cache-dir="/builddir/.kube/http-cache"
174           Default HTTP cache directory
175
176
177       --certificate-authority=""
178           Path to a cert file for the certificate authority
179
180
181       --client-certificate=""
182           Path to a client certificate file for TLS
183
184
185       --client-key=""
186           Path to a client key file for TLS
187
188
189       --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
190           CIDRs opened in GCE firewall for LB traffic proxy  health checks
191
192
193       --cluster=""
194           The name of the kubeconfig cluster to use
195
196
197       --container_hints="/etc/cadvisor/container_hints.json"
198           location of the container hints file
199
200
201       --containerd="unix:///var/run/containerd.sock"
202           containerd endpoint
203
204
205       --context=""
206           The name of the kubeconfig context to use
207
208
209       --default-not-ready-toleration-seconds=300
210           Indicates    the    tolerationSeconds   of   the   toleration   for
211       notReady:NoExecute that is added by default to every pod that does  not
212       already have such a toleration.
213
214
215       --default-unreachable-toleration-seconds=300
216           Indicates  the  tolerationSeconds  of  the  toleration for unreach‐
217       able:NoExecute that is added by default to  every  pod  that  does  not
218       already have such a toleration.
219
220
221       --docker="unix:///var/run/docker.sock"
222           docker endpoint
223
224
225       --docker-tls=false
226           use TLS to connect to docker
227
228
229       --docker-tls-ca="ca.pem"
230           path to trusted CA
231
232
233       --docker-tls-cert="cert.pem"
234           path to client certificate
235
236
237       --docker-tls-key="key.pem"
238           path to private key
239
240
241       --docker_env_metadata_whitelist=""
242           a  comma-separated  list of environment variable keys that needs to
243       be collected for docker containers
244
245
246       --docker_only=false
247           Only report docker containers in addition to root stats
248
249
250       --docker_root="/var/lib/docker"
251           DEPRECATED: docker root is read from docker info (this is  a  fall‐
252       back, default: /var/lib/docker)
253
254
255       --enable_load_reader=false
256           Whether to enable cpu load reader
257
258
259       --event_storage_age_limit="default=24h"
260           Max length of time for which to store events (per type). Value is a
261       comma separated list of key values, where  the  keys  are  event  types
262       (e.g.: creation, oom) or "default" and the value is a duration. Default
263       is applied to all non-specified event types
264
265
266       --event_storage_event_limit="default=100000"
267           Max number of events to store (per type). Value is  a  comma  sepa‐
268       rated  list  of  key values, where the keys are event types (e.g.: cre‐
269       ation, oom) or "default" and  the  value  is  an  integer.  Default  is
270       applied to all non-specified event types
271
272
273       --global_housekeeping_interval=0
274           Interval between global housekeepings
275
276
277       --housekeeping_interval=0
278           Interval between container housekeepings
279
280
281       --insecure-skip-tls-verify=false
282           If true, the server's certificate will not be checked for validity.
283       This will make your HTTPS connections insecure
284
285
286       --kubeconfig=""
287           Path to the kubeconfig file to use for CLI requests.
288
289
290       --log-flush-frequency=0
291           Maximum number of seconds between log flushes
292
293
294       --log_backtrace_at=:0
295           when logging hits line file:N, emit a stack trace
296
297
298       --log_cadvisor_usage=false
299           Whether to log the usage of the cAdvisor container
300
301
302       --log_dir=""
303           If non-empty, write log files in this directory
304
305
306       --logtostderr=true
307           log to standard error instead of files
308
309
310       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
311           Comma-separated list of files to  check  for  machine-id.  Use  the
312       first one that exists.
313
314
315       --match-server-version=false
316           Require server version to match client version
317
318
319       -n, --namespace=""
320           If present, the namespace scope for this CLI request
321
322
323       --request-timeout="0"
324           The  length  of  time  to  wait before giving up on a single server
325       request. Non-zero values should contain a corresponding time unit (e.g.
326       1s, 2m, 3h). A value of zero means don't timeout requests.
327
328
329       -s, --server=""
330           The address and port of the Kubernetes API server
331
332
333       --stderrthreshold=2
334           logs at or above this threshold go to stderr
335
336
337       --storage_driver_buffer_duration=0
338           Writes  in  the  storage driver will be buffered for this duration,
339       and committed to the non memory backends as a single transaction
340
341
342       --storage_driver_db="cadvisor"
343           database name
344
345
346       --storage_driver_host="localhost:8086"
347           database host:port
348
349
350       --storage_driver_password="root"
351           database password
352
353
354       --storage_driver_secure=false
355           use secure connection with database
356
357
358       --storage_driver_table="stats"
359           table name
360
361
362       --storage_driver_user="root"
363           database username
364
365
366       --token=""
367           Bearer token for authentication to the API server
368
369
370       --user=""
371           The name of the kubeconfig user to use
372
373
374       -v, --v=0
375           log level for V logs
376
377
378       --version=false
379           Print version information and quit
380
381
382       --vmodule=
383           comma-separated list of pattern=N settings for  file-filtered  log‐
384       ging
385
386
387

EXAMPLE

389                # Starts build from build config "hello-world"
390                oc start-build hello-world
391
392                # Starts build from a previous build "hello-world-1"
393                oc start-build --from-build=hello-world-1
394
395                # Use the contents of a directory as build input
396                oc start-build hello-world --from-dir=src/
397
398                # Send the contents of a Git repository to the server from tag 'v2'
399                oc start-build hello-world --from-repo=../hello-world --commit=v2
400
401                # Start a new build for build config "hello-world" and watch the logs until the build
402                # completes or fails.
403                oc start-build hello-world --follow
404
405                # Start a new build for build config "hello-world" and wait until the build completes. It
406                # exits with a non-zero return code if the build fails.
407                oc start-build hello-world --wait
408
409
410
411

SEE ALSO

413       oc(1),
414
415
416

HISTORY

418       June 2016, Ported from the Kubernetes man-doc generator
419
420
421
422Openshift                  Openshift CLI User Manuals                    OC(1)
Impressum