Skip to content
Closed
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
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.
290 changes: 0 additions & 290 deletions modules/ob-creating-a-buildpacks-build.adoc

This file was deleted.

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.
Loading