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


.SH NAME
.PP
openshift cli new\-build \- Create a new build configuration


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


.SH DESCRIPTION
.PP
Create a new build by specifying source code

.PP
This command will try to create a build configuration for your application using images and code that has a public repository. It will lookup the images on the local Docker installation (if available), a Docker registry, or an image stream.

.PP
If you specify a source code URL, it will set up a build that takes your source code and converts it into an image that can run inside of a pod. Local source must be in a git repository that has a remote repository that the server can see.

.PP
Once the build configuration is created a new build will be automatically triggered. You can use 'openshift cli status' to check the progress.


.SH OPTIONS
.PP
\fB\-\-allow\-missing\-images\fP=false
    If true, indicates that referenced Docker images that cannot be found locally or in a registry should still be used.

.PP
\fB\-\-allow\-missing\-imagestream\-tags\fP=false
    If true, indicates that image stream tags that don't exist should still be used.

.PP
\fB\-\-binary\fP=false
    Instead of expecting a source URL, set the build to expect binary contents. Will disable triggers.

.PP
\fB\-\-build\-secret\fP=[]
    Secret and destination to use as an input for the build.

.PP
\fB\-\-code\fP=[]
    Source code in the build configuration.

.PP
\fB\-\-context\-dir\fP=""
    Context directory to be used for the build.

.PP
\fB\-\-docker\-image\fP=[]
    Name of a Docker image to use as a builder.

.PP
\fB\-D\fP, \fB\-\-dockerfile\fP=""
    Specify the contents of a Dockerfile to build directly, implies \-\-strategy=docker. Pass '\-' to read from STDIN.

.PP
\fB\-\-dry\-run\fP=false
    If true, show the result of the operation without performing it.

.PP
\fB\-e\fP, \fB\-\-env\fP=[]
    Specify a key\-value pair for an environment variable to set into resulting image.

.PP
\fB\-\-env\-file\fP=[]
    File containing key\-value pairs of environment variables to set into each container.

.PP
\fB\-\-image\fP=[]
    Name of an image stream to to use as a builder. (deprecated)

.PP
\fB\-i\fP, \fB\-\-image\-stream\fP=[]
    Name of an image stream to to use as a builder.

.PP
\fB\-l\fP, \fB\-\-labels\fP=""
    Label to set in all generated resources.

.PP
\fB\-\-name\fP=""
    Set name to use for generated build artifacts.

.PP
\fB\-\-no\-output\fP=false
    If true, the build output will not be pushed anywhere.

.PP
\fB\-o\fP, \fB\-\-output\fP=""
    Output results as yaml or json instead of executing, or use name for succint output (resource/name).

.PP
\fB\-\-output\-version\fP=""
    The preferred API versions of the output objects

.PP
\fB\-\-source\-image\fP=""
    Specify an image to use as source for the build.  You must also specify \-\-source\-image\-path.

.PP
\fB\-\-source\-image\-path\fP=""
    Specify the file or directory to copy from the source image and its destination in the build directory. Format: [source]:[destination\-dir].

.PP
\fB\-\-strategy\fP=
    Specify the build strategy to use if you don't want to detect (docker|pipeline|source).

.PP
\fB\-\-to\fP=""
    Push built images to this image stream tag (or Docker image repository if \-\-to\-docker is set).

.PP
\fB\-\-to\-docker\fP=false
    If true, have the build output push to a Docker repository.


.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
  # Create a build config based on the source code in the current git repository (with a public
  # remote) and a Docker image
  openshift cli new\-build . \-\-docker\-image=repo/langimage
  
  # Create a NodeJS build config based on the provided [image]\~[source code] combination
  openshift cli new\-build openshift/nodejs\-010\-centos7\~https://github.com/openshift/nodejs\-ex.git
  
  # Create a build config from a remote repository using its beta2 branch
  openshift cli new\-build https://github.com/openshift/ruby\-hello\-world#beta2
  
  # Create a build config using a Dockerfile specified as an argument
  openshift cli new\-build \-D $'FROM centos:7\\nRUN yum install \-y httpd'
  
  # Create a build config from a remote repository and add custom environment variables
  openshift cli new\-build https://github.com/openshift/ruby\-hello\-world RACK\_ENV=development
  
  # Create a build config from a remote repository and inject the npmrc into a build
  openshift cli new\-build https://github.com/openshift/ruby\-hello\-world \-\-build\-secret npmrc:.npmrc
  
  # Create a build config that gets its input from a remote repository and another Docker image
  openshift cli new\-build https://github.com/openshift/ruby\-hello\-world \-\-source\-image=openshift/jenkins\-1\-centos7 \-\-source\-image\-path=/var/lib/jenkins:tmp

.fi
.RE


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


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