|
| 1 | +// Module included in the following assemblies: |
| 2 | +// * builds/basic-build-operations.adoc |
| 3 | + |
| 4 | +[id="builds-basic-edit-buildconfig_{context}"] |
| 5 | += Editing a BuildConfig |
| 6 | + |
| 7 | +To edit your build configurations, you use the *Edit BuildConfig* option in the *Builds* view of the *Developer* perspective. |
| 8 | + |
| 9 | +You can use either of the following views to edit a `BuildConfig`: |
| 10 | + |
| 11 | +* The *Form view* enables you to edit your `BuildConfig` using the standard form fields and checkboxes. |
| 12 | +* The *YAML view* enables you to edit your `BuildConfig` with full control over the operations. |
| 13 | + |
| 14 | +You can switch between the *Form view* and *YAML view* without losing any data. The data in the *Form view* is transferred to the *YAML view* and vice versa. |
| 15 | + |
| 16 | +.Procedure |
| 17 | + |
| 18 | +. In the *Builds* view of the *Developer* perspective, click the menu {kebab} to see the *Edit BuildConfig* option. |
| 19 | +. Click *Edit BuildConfig* to see the *Form view* option. |
| 20 | +. In the *Git* section, enter the Git repository URL for the codebase you want to use to create an application. The URL is then validated. |
| 21 | +* Optional: Click *Show Advanced Git Options* to add details such as: |
| 22 | +** *Git Reference* to specify a branch, tag, or commit that contains code you want to use to build the application. |
| 23 | +** *Context Dir* to specify the subdirectory that contains code you want to use to build the application. |
| 24 | +** *Source Secret* to create a *Secret Name* with credentials for pulling your source code from a private repository. |
| 25 | +. In the *Build from* section, select the option that you would like to build from. You can use the following options: |
| 26 | +** *Image Stream tag* references an image for a given image stream and tag. Enter the project, image stream, and tag of the location you would like to build from and push to. |
| 27 | +** *Image Stream image* references an image for a given image stream and image name. Enter the image stream image you would like to build from. Also enter the project, image stream, and tag to push to. |
| 28 | +** *Docker image*: The Docker image is referenced through a Docker image repository. You will also need to enter the project, image stream, and tag to refer to where you would like to push to. |
| 29 | +. Optional: In the *Environment Variables* section, add the environment variables associated with the project by using the *Name* and *Value* fields. To add more environment variables, use *Add Value*, or *Add from ConfigMap* and *Secret* . |
| 30 | +. Optional: To further customize your application, use the following advanced options: |
| 31 | +Trigger:: |
| 32 | +Triggers a new image build when the builder image changes. Add more triggers by clicking *Add Trigger* and selecting the *Type* and *Secret*. |
| 33 | + |
| 34 | +Secrets:: |
| 35 | +Adds secrets for your application. Add more secrets by clicking *Add secret* and selecting the *Secret* and *Mount point*. |
| 36 | + |
| 37 | +Policy:: |
| 38 | +Click *Run policy* to select the build run policy. The selected policy determines the order in which builds created from the build configuration must run. |
| 39 | + |
| 40 | +Hooks:: |
| 41 | +Select *Run build hooks after image is built* to run commands at the end of the build and verify the image. Add *Hook type*, *Command*, and *Arguments* to append to the command. |
| 42 | + |
| 43 | +. Click *Save* to save the `BuildConfig`. |
0 commit comments