// Module included in the following assemblies: // // * cli_reference/openshift_cli/developer-cli-commands.adoc [id="cli-build-deploy-commands_{context}"] = Build and Deploy CLI commands == cancel-build Cancel a running, pending, or new build. .Example: Cancel a build [source,terminal] ---- $ oc cancel-build python-1 ---- .Example: Cancel all pending builds from the `python` build config [source,terminal] ---- $ oc cancel-build buildconfig/python --state=pending ---- == import-image Import the latest tag and image information from an image repository. .Example: Import the latest image information [source,terminal] ---- $ oc import-image my-ruby ---- == new-build Create a new build config from source code. .Example: Create a build config from a local Git repository [source,terminal] ---- $ oc new-build . ---- .Example: Create a build config from a remote Git repository [source,terminal] ---- $ oc new-build https://github.com/sclorg/cakephp-ex ---- == rollback Revert an application back to a previous deployment. .Example: Roll back to the last successful deployment [source,terminal] ---- $ oc rollback php ---- .Example: Roll back to a specific version [source,terminal] ---- $ oc rollback php --to-version=3 ---- == rollout Start a new rollout, view its status or history, or roll back to a previous revision of your application. .Example: Roll back to the last successful deployment [source,terminal] ---- $ oc rollout undo deploymentconfig/php ---- .Example: Start a new rollout for a deployment with its latest state [source,terminal] ---- $ oc rollout latest deploymentconfig/php ---- == start-build Start a build from a build config or copy an existing build. .Example: Start a build from the specified build config [source,terminal] ---- $ oc start-build python ---- .Example: Start a build from a previous build [source,terminal] ---- $ oc start-build --from-build=python-1 ---- .Example: Set an environment variable to use for the current build [source,terminal] ---- $ oc start-build python --env=mykey=myvalue ---- == tag Tag existing images into image streams. .Example: Configure the `ruby` image's `latest` tag to refer to the image for the `2.0` tag [source,terminal] ---- $ oc tag ruby:latest ruby:2.0 ----