.TH "OPENSHIFT CLI" "1" " Openshift CLI User Manuals" "Openshift" "June 2016"  ""


.SH NAME
.PP
openshift cli start\-build \- Start a new build


.SH SYNOPSIS
.PP
\fBopenshift cli start\-build\fP [OPTIONS]


.SH DESCRIPTION
.PP
Start a build

.PP
This command starts a new build for the provided build config or copies an existing build using \-\-from\-build= <name>. Pass the \-\-follow flag to see output from the build.

.PP
In addition, you can pass a file, directory, or source code repository with the \-\-from\-file, \-\-from\-dir, or \-\-from\-repo flags directly to the build. The contents will be streamed to the build and override the current build source settings. When using \-\-from\-repo, the \-\-commit flag can be used to control which branch, tag, or commit is sent to the server. If you pass \-\-from\-file, the file is placed in the root of an empty directory with the same filename. It is also possible to pass a http or https url to \-\-from\-file and \-\-from\-archive, however authentication is not supported and in case of https the certificate must be valid and recognized by your system.

.PP
Note that builds triggered from binary input will not preserve the source on the server, so rebuilds triggered by base image changes will use the source specified on the build config.


.SH OPTIONS
.PP
\fB\-\-build\-loglevel\fP=""
    Specify the log level for the build log output

.PP
\fB\-\-commit\fP=""
    Specify the source code commit identifier the build should use; requires a build based on a Git repository

.PP
\fB\-e\fP, \fB\-\-env\fP=[]
    Specify a key\-value pair for an environment variable to set for the build container.

.PP
\fB\-F\fP, \fB\-\-follow\fP=false
    Start a build and watch its logs until it completes or fails

.PP
\fB\-\-from\-archive\fP=""
    An archive (tar, tar.gz, zip) to be extracted before the build and used as the binary input.

.PP
\fB\-\-from\-build\fP=""
    Specify the name of a build which should be re\-run

.PP
\fB\-\-from\-dir\fP=""
    A directory to archive and use as the binary input for a build.

.PP
\fB\-\-from\-file\fP=""
    A file to use as the binary input for the build; example a pom.xml or Dockerfile. Will be the only file in the build source.

.PP
\fB\-\-from\-repo\fP=""
    The path to a local source code repository to use as the binary input for a build.

.PP
\fB\-\-from\-webhook\fP=""
    Specify a generic webhook URL for an existing build config to trigger

.PP
\fB\-\-git\-post\-receive\fP=""
    The contents of the post\-receive hook to trigger a build

.PP
\fB\-\-git\-repository\fP=""
    The path to the git repository for post\-receive; defaults to the current directory

.PP
\fB\-\-list\-webhooks\fP=""
    List the webhooks for the specified build config or build; accepts 'all', 'generic', or 'github'

.PP
\fB\-o\fP, \fB\-\-output\fP=""
    Output mode. Use "\-o name" for shorter output (resource/name).

.PP
\fB\-w\fP, \fB\-\-wait\fP=false
    Wait for a build to complete and exit with a non\-zero return code if the build fails


.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-api\-version\fP=""
    DEPRECATED: The API version to use when talking to the server

.PP
\fB\-\-as\fP=""
    Username to impersonate for the operation

.PP
\fB\-\-certificate\-authority\fP=""
    Path to a cert. file for the certificate authority

.PP
\fB\-\-client\-certificate\fP=""
    Path to a client certificate file for TLS

.PP
\fB\-\-client\-key\fP=""
    Path to a client key file for TLS

.PP
\fB\-\-cluster\fP=""
    The name of the kubeconfig cluster to use

.PP
\fB\-\-config\fP=""
    Path to the config file to use for CLI requests.

.PP
\fB\-\-context\fP=""
    The name of the kubeconfig context to use

.PP
\fB\-\-google\-json\-key\fP=""
    The Google Cloud Platform Service Account JSON Key to use for authentication.

.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
    If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure

.PP
\fB\-\-log\-flush\-frequency\fP=0
    Maximum number of seconds between log flushes

.PP
\fB\-\-match\-server\-version\fP=false
    Require server version to match client version

.PP
\fB\-n\fP, \fB\-\-namespace\fP=""
    If present, the namespace scope for this CLI request

.PP
\fB\-\-request\-timeout\fP="0"
    The length of time to wait before giving up on a single server request. Non\-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.

.PP
\fB\-\-server\fP=""
    The address and port of the Kubernetes API server

.PP
\fB\-\-token\fP=""
    Bearer token for authentication to the API server

.PP
\fB\-\-user\fP=""
    The name of the kubeconfig user to use


.SH EXAMPLE
.PP
.RS

.nf
  # Starts build from build config "hello\-world"
  openshift cli start\-build hello\-world
  
  # Starts build from a previous build "hello\-world\-1"
  openshift cli start\-build \-\-from\-build=hello\-world\-1
  
  # Use the contents of a directory as build input
  openshift cli start\-build hello\-world \-\-from\-dir=src/
  
  # Send the contents of a Git repository to the server from tag 'v2'
  openshift cli start\-build hello\-world \-\-from\-repo=../hello\-world \-\-commit=v2
  
  # Start a new build for build config "hello\-world" and watch the logs until the build
  # completes or fails.
  openshift cli start\-build hello\-world \-\-follow
  
  # Start a new build for build config "hello\-world" and wait until the build completes. It
  # exits with a non\-zero return code if the build fails.
  openshift cli start\-build hello\-world \-\-wait

.fi
.RE


.SH SEE ALSO
.PP
\fBopenshift\-cli(1)\fP,


.SH HISTORY
.PP
June 2016, Ported from the Kubernetes man\-doc generator