diff --git a/modules/applications-create-using-cli-source-code.adoc b/modules/applications-create-using-cli-source-code.adoc index 6f00684a99..fd7b10132c 100644 --- a/modules/applications-create-using-cli-source-code.adoc +++ b/modules/applications-create-using-cli-source-code.adoc @@ -5,8 +5,9 @@ With the `new-app` command you can create applications from source code in a loc The `new-app` command creates a build configuration, which itself creates a new application image from your source code. The `new-app` command typically also creates a `Deployment` object to deploy the new image, and a service to provide load-balanced access to the deployment running your image. -{product-title} automatically detects whether the pipeline or source build strategy should be used, and in the case of source builds, detects an appropriate language builder image. +{product-title} automatically detects whether the pipeline, source, or docker build strategy should be used, and in the case of source build, detects an appropriate language builder image. +[id="local_{context}"] == Local To create an application from a Git repository in a local directory: @@ -21,6 +22,7 @@ $ oc new-app / If you use a local Git repository, the repository must have a remote named `origin` that points to a URL that is accessible by the {product-title} cluster. If there is no recognized remote, running the `new-app` command will create a binary build. ==== +[id="remote_{context}"] == Remote To create an application from a remote Git repository: @@ -57,11 +59,21 @@ Also, when specifying a remote URL, you can specify a Git branch to use by appen $ oc new-app https://github.com/openshift/ruby-hello-world.git#beta4 ---- +[id="build-strategy-detection_{context}"] == Build strategy detection -If a Jenkins file exists in the root or specified context directory of the source repository when creating a new application, {product-title} generates a pipeline build strategy. Otherwise, it generates a source build strategy. +{product-title} automatically determines which build strategy to use by detecting certain files: -Override the build strategy by setting the `--strategy` flag to either `pipeline` or `source`. +* If a Jenkins file exists in the root or specified context directory of the source repository when creating a new application, {product-title} generates a pipeline build strategy. ++ +[NOTE] +==== +The `pipeline` build strategy is deprecated; consider using {pipelines-title} instead. +==== +* If a Dockerfile exists in the root or specified context directory of the source repository when creating a new application, {product-title} generates a docker build strategy. +* If neither a Jenkins file nor a Dockerfile is detected, {product-title} generates a source build strategy. + +Override the automatically detected build strategy by setting the `--strategy` flag to `docker`, `pipeline`, or `source`. [source,terminal] ---- @@ -73,6 +85,7 @@ $ oc new-app /home/user/code/myapp --strategy=docker The `oc` command requires that files containing build sources are available in a remote Git repository. For all source builds, you must use `git remote -v`. ==== +[id="language-detection_{context}"] == Language detection If you use the source build strategy, `new-app` attempts to determine the language builder to use by the presence of certain files in the root or specified context directory of the repository: