OPENSHIFT CLI(1)

NAME

openshift cli start-build - Start a new build

SYNOPSIS

openshift cli start-build [OPTIONS]

DESCRIPTION

Start a build

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.

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.

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.

OPTIONS

--build-loglevel=""
    Specify the log level for the build log output

--commit=""
    Specify the source code commit identifier the build should use; requires a build based on a Git repository

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

-F, --follow=false
    Start a build and watch its logs until it completes or fails

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

--from-build=""
    Specify the name of a build which should be re-run

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

--from-file=""
    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.

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

--from-webhook=""
    Specify a generic webhook URL for an existing build config to trigger

--git-post-receive=""
    The contents of the post-receive hook to trigger a build

--git-repository=""
    The path to the git repository for post-receive; defaults to the current directory

--list-webhooks=""
    List the webhooks for the specified build config or build; accepts 'all', 'generic', or 'github'

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

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

OPTIONS INHERITED FROM PARENT COMMANDS

--api-version=""
    DEPRECATED: The API version to use when talking to the server

--as=""
    Username to impersonate for the operation

--azure-container-registry-config=""
    Path to the file container Azure container registry configuration information.

--certificate-authority=""
    Path to a cert. file for the certificate authority

--client-certificate=""
    Path to a client certificate file for TLS

--client-key=""
    Path to a client key file for TLS

--cluster=""
    The name of the kubeconfig cluster to use

--config=""
    Path to the config file to use for CLI requests.

--context=""
    The name of the kubeconfig context to use

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

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

--log-flush-frequency=0
    Maximum number of seconds between log flushes

--match-server-version=false
    Require server version to match client version

-n, --namespace=""
    If present, the namespace scope for this CLI request

--request-timeout="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.

--server=""
    The address and port of the Kubernetes API server

--token=""
    Bearer token for authentication to the API server

--user=""
    The name of the kubeconfig user to use

EXAMPLE

      # 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

SEE ALSO

openshift-cli(1),

HISTORY

June 2016, Ported from the Kubernetes man-doc generator