mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
100 lines
3.3 KiB
Plaintext
100 lines
3.3 KiB
Plaintext
// This module is included in the following assembly:
|
|
//
|
|
// *openshift_pipelines/creating-applications-with-cicd-pipelines.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="defining-and-creating-pipelineresources_{context}"]
|
|
= Defining and creating PipelineResources
|
|
|
|
_PipelineResources_ are artifacts that are used as inputs or outputs of a Task.
|
|
|
|
After you create Tasks, create PipelineResources that contain the specifics of the Git repository and the image registry to be used in the Pipeline during execution:
|
|
[NOTE]
|
|
====
|
|
If you are not in the `pipelines-tutorial` namespace, and are using another namespace, ensure you update the front-end and back-end image resource to the correct URL with your namespace in the steps below. For example:
|
|
----
|
|
image-registry.openshift-image-registry.svc:5000/<namespace-name>/vote-api:latest
|
|
----
|
|
====
|
|
[discrete]
|
|
.Procedure
|
|
. Create a PipelineResource that defines the Git repository for the front-end application:
|
|
+
|
|
----
|
|
$ tkn resource create
|
|
? Enter a name for a pipeline resource : ui-repo
|
|
? Select a resource type to create : git
|
|
? Enter a value for url : http://github.com/openshift-pipelines/vote-ui.git
|
|
? Enter a value for revision : release-tech-preview-1
|
|
----
|
|
+
|
|
The output verifies that the `ui-repo` PipelineResource was created.
|
|
+
|
|
----
|
|
New git resource "ui-repo" has been created
|
|
----
|
|
|
|
. Create a PipelineResource that defines the {product-title} {product-registry} to where you want to push the front-end image:
|
|
+
|
|
----
|
|
$ tkn resource create
|
|
? Enter a name for a pipeline resource : ui-image
|
|
? Select a resource type to create : image
|
|
? Enter a value for url : image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/ui:latest
|
|
? Enter a value for digest :
|
|
----
|
|
+
|
|
The output verifies that the `ui-image` PipelineResource was created.
|
|
+
|
|
----
|
|
New image resource "ui-image" has been created
|
|
----
|
|
|
|
. Create a PipelineResource that defines the Git repository for the back-end application:
|
|
+
|
|
----
|
|
$ tkn resource create
|
|
? Enter a name for a pipeline resource : api-repo
|
|
? Select a resource type to create : git
|
|
? Enter a value for url : http://github.com/openshift-pipelines/vote-api.git
|
|
? Enter a value for revision : release-tech-preview-1
|
|
----
|
|
+
|
|
The output verifies that the `api-repo` PipelineResource was created.
|
|
+
|
|
----
|
|
New git resource "api-repo" has been created
|
|
----
|
|
|
|
. Create a PipelineResource that defines the {product-title} {product-registry} to where you want to push the back-end image:
|
|
+
|
|
----
|
|
$ tkn resource create
|
|
? Enter a name for a pipeline resource : api-image
|
|
? Select a resource type to create : image
|
|
? Enter a value for url : image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/api:latest
|
|
? Enter a value for digest :
|
|
----
|
|
+
|
|
The output verifies that the `api-image` PipelineResource was created.
|
|
+
|
|
----
|
|
New image resource "api-image" has been created
|
|
----
|
|
|
|
. View the list of `resources` created:
|
|
+
|
|
----
|
|
$ tkn resource list
|
|
----
|
|
+
|
|
The output lists all the PipelineResource that were created.
|
|
+
|
|
----
|
|
NAME TYPE DETAILS
|
|
api-repo git url: http://github.com/openshift-pipelines/vote-api.git
|
|
ui-repo git url: http://github.com/openshift-pipelines/vote-ui.git
|
|
api-image image url: image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/api:latest
|
|
ui-image image url: image-registry.openshift-image-registry.svc:5000/pipelines-tutorial/ui:latest
|
|
----
|