oc-start-build man page
oc start-build — Start a new build
oc start-build [Options]
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.
Specify the log level for the build log output
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
An archive (tar, tar.gz, zip) to be extracted before the build and used as the binary input.
Specify the name of a build which should be re-run
A directory to archive and use as the binary input for a build.
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.
The path to a local source code repository to use as the binary input for a build.
Specify a generic webhook URL for an existing build config to trigger
The contents of the post-receive hook to trigger a build
The path to the git repository for post-receive; defaults to the current directory
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
DEPRECATED: The API version to use when talking to the server
Username to impersonate for the operation
Path to the file container Azure container registry configuration information.
Path to a cert. file for the certificate authority
Path to a client certificate file for TLS
Path to a client key file for TLS
The name of the kubeconfig cluster to use
Path to the config file to use for CLI requests.
The name of the kubeconfig context to use
The Google Cloud Platform Service Account JSON Key to use for authentication.
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
Maximum number of seconds between log flushes
Require server version to match client version
- -n, --namespace=""
If present, the namespace scope for this CLI request
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.
The address and port of the Kubernetes API server
Bearer token for authentication to the API server
The name of the kubeconfig user to use
# Starts build from build config "hello-world" oc start-build hello-world # Starts build from a previous build "hello-world-1" oc start-build --from-build=hello-world-1 # Use the contents of a directory as build input oc start-build hello-world --from-dir=src/ # Send the contents of a Git repository to the server from tag 'v2' oc 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. oc 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. oc start-build hello-world --wait
June 2016, Ported from the Kubernetes man-doc generator