Skip to content

Commit c2d8108

Browse files
committed
OCPBUGS-6843: Adding details about docker build strategy
1 parent a9fd3ec commit c2d8108

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

modules/applications-create-using-cli-source-code.adoc

+16-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ With the `new-app` command you can create applications from source code in a loc
55

66
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.
77

8-
{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.
8+
{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.
99

10+
[id="local_{context}"]
1011
== Local
1112

1213
To create an application from a Git repository in a local directory:
@@ -21,6 +22,7 @@ $ oc new-app /<path to source code>
2122
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.
2223
====
2324

25+
[id="remote_{context}"]
2426
== Remote
2527

2628
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
5759
$ oc new-app https://github.com/openshift/ruby-hello-world.git#beta4
5860
----
5961

62+
[id="build-strategy-detection_{context}"]
6063
== Build strategy detection
6164

62-
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.
65+
{product-title} automatically determines which build strategy to use by detecting certain files:
6366

64-
Override the build strategy by setting the `--strategy` flag to either `pipeline` or `source`.
67+
* 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.
68+
+
69+
[NOTE]
70+
====
71+
The `pipeline` build strategy is deprecated; consider using {pipelines-title} instead.
72+
====
73+
* 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.
74+
* If neither a Jenkins file nor a Dockerfile is detected, {product-title} generates a source build strategy.
75+
76+
Override the automatically detected build strategy by setting the `--strategy` flag to `docker`, `pipeline`, or `source`.
6577

6678
[source,terminal]
6779
----
@@ -73,6 +85,7 @@ $ oc new-app /home/user/code/myapp --strategy=docker
7385
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`.
7486
====
7587

88+
[id="language-detection_{context}"]
7689
== Language detection
7790

7891
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:

0 commit comments

Comments
 (0)