Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Name: Work with Builds
Dir: work_with_builds
Distros: openshift-builds
Topics:
- Name: Running Builds
- Name: Managing Builds
File: using-builds
---
Name: Work with Shared Resources
Expand All @@ -83,8 +83,10 @@ Name: Observability
Dir: observability
Distros: openshift-builds
Topics:
- Name: Build controller observability
File: build-controller-observability
- Name: Logging
File: logging
- Name: Monitoring
File: monitoring
---
Name: Uninstall
Dir: uninstalling
Expand Down
7 changes: 2 additions & 5 deletions about/build-strategies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ You can use a curated set of build strategies or cluster build strategies on the
* `buildah`: Supported on all platforms
* `source-to-image`: Supported on the linux/amd64 platform

[NOTE]
====
The `buildpacks` build strategy is currently in link:https://access.redhat.com/support/offerings/devpreview[Developer Preview]. For more information, see the link:https://github.com/redhat-developer/openshift-builds-catalog/blob/main/clusterBuildStrategy/buildpacks/README.md[buildpacks example].
====
:FeatureName: The `buildpacks` build strategy
include::snippets/developer-preview.adoc[]

include::modules/ob-about-buildah.adoc[leveloffset=+1]

include::modules/ob-about-s2i.adoc[leveloffset=+1]


[role="_additional-resources"]
[id="additional-resources_installing-sample-build-strategies"]
== Additional resources
Expand Down
45 changes: 43 additions & 2 deletions modules/ob-creating-a-build-with-oci-artifacts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,46 @@ EOF
<5> Optional: Replace `<secret-name-for-credentials>` with the secret name that stores the credentials for pushing container images. To generate a secret for a private registry for authentication, see link:https://docs.redhat.com/en/documentation/builds_for_red_hat_openshift/1.5/html-single/authentication/index#ob-authentication-to-container-registries_understanding-authentication-at-runtime[Authentication to container registries]

. Choose one of the following methods to upload your source code to the required registry and run the build:
.. Use the shp CLI
.. Manually upload the OCI artifact
* Use the `shp` CLI:

** Run the following command in the directory containing the local source code. It packages your source code into a scratch container image, pushes it to the required registry, and runs the build:
+
[source,terminal]
----
$ shp build upload my-oci-build # <1>
----
<1> Defines the name of the `Build` resource.

* Upload the OCI artifact manually:

.. Create a `Containerfile` in the root directory of your source code and add the following configuration:
+
[source,dockerfile]
----
FROM scratch
COPY . /
----

.. Run the following command in the root directory of your source code to build the container image using Podman:
+
[source,terminal]
----
$ podman build -t <registry-path>/<image-name>:<tag> # <1>
----
<1> Replace <registry-path>/<image-name>:<tag> with the build location for the container image.

.. Push the container image to the required location using the following command:
+
[source,terminal]
----
$ podman push <registry-path>/<image-name>:<tag> # <1>
----
<1> Replace <registry-path>/<image-name>:<tag> with the location where you want to push the built image.

.. Run the build using the following command:
+
[source,terminal]
----
$ shp build run my-oci-build # <1>
----
<1> Defines the name of the `Build` resource.
31 changes: 31 additions & 0 deletions modules/ob-deleting-a-build-resource.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:_mod-docs-content-type: PROCEDURE
[id="ob-deleting-a-build-resources_{context}"]
= Deleting a build resource

[role="_abstract"]
You can delete a `build` resource if it is not required in your project.

.Prerequisites

* You have installed the `oc` CLI.
* Optional: You have installed the shp CLI.

.Procedure

* Delete a `build` resource by using one of the following CLIs:

** Using `oc` CLI
+
[source,terminal]
----
$ oc delete builds <build_resource_name> # <1>
----
<1> Replace <build_resource_name> with the name of the `build` resource.

** Using `shp` CLI
+
[source,terminal]
----
$ shp build delete <build_resource_name> # <1>
----
<1> Replace <build_resource_name> with the name of the `build` resource.
31 changes: 31 additions & 0 deletions modules/ob-deleting-a-buildrun-resource.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:_mod-docs-content-type: PROCEDURE
[id="ob-deleting-a-buildrun-resources_{context}"]
= Deleting a buildrun resource

[role="_abstract"]
You can delete a `buildrun` resource if it is not required in your project.

.Prerequisites

* You have installed the `oc` CLI.
* Optional: You have installed the shp CLI.

.Procedure

* Delete a `build` resource by using one of the following CLIs:

** Using `oc` CLI
+
[source,terminal]
----
$ oc delete buildrun <buildrun_resource_name> #<1>
----
<1> Replace <buildrun_resource_name> with the name of the `buildrun` resource.

** Using `shp` CLI
+
[source,terminal]
----
$ oc delete buildrun <buildrun_resource_name> # <1>
----
<1> Replace <buildrun_resource_name> with the name of the `buildrun` resource.
20 changes: 20 additions & 0 deletions modules/ob-deleting-a-buildstrategy-resource.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:_mod-docs-content-type: PROCEDURE
[id="ob-deleting-a-buildstrategy-resources_{context}"]
= Deleting a buildstrategy resource

[role="_abstract"]
You can delete a `buildstrategy` resource if it is not required in your project.

.Prerequisites

* You have installed the `oc` CLI.

.Procedure

* Delete a `buildstrategy` resource by using the `oc` CLI:
+
[source,terminal]
----
$ oc delete buildstrategy <buildstartegy_resource_name> # <1>
----
<1> Replace <buildstartegy_resource_name> with the name of the `buildstrategy` resource.
53 changes: 0 additions & 53 deletions modules/ob-deleting-a-resource.adoc

This file was deleted.

6 changes: 6 additions & 0 deletions modules/ob-deleting-the-resources.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:_mod-docs-content-type: CONCEPT
[id="ob-deleting-the-resources_{context}"]
= Deleting the resources

You can delete resources created by the `buildah` and `source-to-image` (S2I) build processes using the oc CLI or the shp CLI. Deleting these resources helps you to
clean up build configurations that are no longer required in your project.
22 changes: 22 additions & 0 deletions modules/ob-editing-the-resources.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
:_mod-docs-content-type: PROCEDURE
[id="ob-editing-the-resources_{context}"]
= Editing the resources

[role="_abstract"]
You can edit the resources that are created by `buildah` and `source-to-image` build processes using the `oc` CLI. You can modify the resources as needed in your project.

.Prerequisites

* You have installed the `oc` CLI.

.Procedure

. Run the following command to open the YAML definition in the default editor:
+
[source,terminal]
----
$ oc edit <resource_name> <build_resource_name> # <1>
----
<1> Replace `<resource_name>` with the name of the resource (`build`, `buildrun` or `buildstrategy`) and `<build_resource_name>` with the name of the build resource that you want to edit.

. Edit the YAML definition and save the file.
18 changes: 0 additions & 18 deletions modules/ob-uploading-the-OCI-artifact-by-using-the-CLI.adoc

This file was deleted.

42 changes: 0 additions & 42 deletions modules/ob-uploading-the-OCI-artifact-manually.adoc

This file was deleted.

13 changes: 13 additions & 0 deletions observability/logging.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:_mod-docs-content-type: ASSEMBLY
[id="logging"]
= Logging
include::_attributes/common-attributes.adoc[]
:context: logging

toc::[]

[role="_abstract"]
When a build fails or behaves unexpectedly, accessing detailed logs can help you identify the issue. The logs provide information about what happened during the build run.

include::modules/ob-viewing-logs.adoc[leveloffset=+1]

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:_mod-docs-content-type: ASSEMBLY
[id="build-controller-observability"]
= Build controller observability
[id="monitoring"]
= Monitoring
include::_attributes/common-attributes.adoc[]
:context: build-controller-observability
:context: monitoring

toc::[]

Expand Down
2 changes: 1 addition & 1 deletion release_notes/ob-openshift-builds-release-notes.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
[id="ob-openshift-builds-release-notes"]
include::_attributes/common-attributes.adoc[]
= {builds-title-uppercase} release notes
:context: ob-openshift-builds-release-notes

Expand Down
17 changes: 10 additions & 7 deletions work_with_builds/using-builds.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:_mod-docs-content-type: ASSEMBLY
[id="using-builds"]
[id="managing-builds"]
include::_attributes/common-attributes.adoc[]
= Running {builds-shortname}
= Managing {builds-shortname}
:context: using-builds

toc::[]
Expand All @@ -18,15 +18,18 @@ include::modules/ob-creating-a-s2i-build.adoc[leveloffset=+1]

include::modules/ob-creating-s2i-build-in-a-network-restricted-environment.adoc[leveloffset=+2]

include::modules/ob-viewing-logs.adoc[leveloffset=+1]
include::modules/ob-creating-a-build-with-oci-artifacts.adoc[leveloffset=+1]

include::modules/ob-deleting-a-resource.adoc[leveloffset=+1]
include::modules/ob-editing-the-resources.adoc[leveloffset=+1]

include::modules/ob-creating-a-build-with-oci-artifacts.adoc[leveloffset=+1]
include::modules/ob-deleting-the-resources.adoc[leveloffset=+1]

include::modules/ob-deleting-a-build-resource.adoc[leveloffset=+2]

include::modules/ob-deleting-a-buildrun-resource.adoc[leveloffset=+2]

include::modules/ob-uploading-the-OCI-artifact-by-using-the-CLI.adoc[leveloffset=+2]
include::modules/ob-deleting-a-buildstrategy-resource.adoc[leveloffset=+2]

include::modules/ob-uploading-the-OCI-artifact-manually.adoc[leveloffset=+2]

[role="_additional-resources"]
[id="additional-resources_using-builds"]
Expand Down