From 4ac761a927861ecc2183f53e942431f72ed759e2 Mon Sep 17 00:00:00 2001 From: Souvik Sarkar Date: Tue, 6 Apr 2021 12:58:14 +0530 Subject: [PATCH] [WIP] Removed workspace from update-deployment in pipelines YAML. --- modules/op-assembling-a-pipeline.adoc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/modules/op-assembling-a-pipeline.adoc b/modules/op-assembling-a-pipeline.adoc index 1f661af580ae..a3e542f64198 100644 --- a/modules/op-assembling-a-pipeline.adoc +++ b/modules/op-assembling-a-pipeline.adoc @@ -5,28 +5,28 @@ [id="assembling-a-pipeline_{context}"] = Assembling a Pipeline -A Pipeline represents a CI/CD flow and is defined by the Tasks to be executed. It is designed to be generic and reusable in multiple applications and environments. +A pipeline represents a CI/CD flow and is defined by the tasks to be executed. It is designed to be generic and reusable in multiple applications and environments. -A Pipeline specifies how the Tasks interact with each other and their order of execution using the `from` and `runAfter` parameters. It uses the `workspaces` field to specify one or more volumes that each Task in the Pipeline requires during execution. +A pipeline specifies how the tasks interact with each other and their order of execution, using the `from` and `runAfter` parameters. It uses the `workspaces` field to specify one or more volumes that each task in the pipeline requires during execution. -In this section, you will create a Pipeline that takes the source code of the application from GitHub and then builds and deploys it on {product-title}. +In this section, you will create a pipeline that takes the source code of the application from GitHub and then builds and deploys it on {product-title}. //The image below displays the various components of `pipelines-tutorial` Pipeline, and how these components interact with each other. //image::op-assemble-a-pipeline.png[] -The Pipeline performs the following tasks for the back-end application `vote-api` and front-end application `vote-ui`: +The pipeline performs the following tasks for the back-end application `vote-api` and front-end application `vote-ui`: * Clones the source code of the application from the Git repository by referring to the `git-url` and `git-revision` parameters. -* Builds the container image using the `buildah` ClusterTask. +* Builds the container image using the `buildah` cluster task. * Pushes the image to the internal image registry by referring to the `image` parameter. -* Deploys the new image on {product-title} by using the `apply-manifests` and `update-deployment` Tasks. +* Deploys the new image on {product-title} by using the `apply-manifests` and `update-deployment` tasks. [discrete] .Procedure -. Copy the contents of the following sample Pipeline YAML file and save it: +. Copy the contents of the following sample pipeline YAML file and save it: + [source,yaml,subs="attributes+"] ---- @@ -93,9 +93,6 @@ spec: - name: update-deployment taskRef: name: update-deployment - workspaces: - - name: source - workspace: shared-workspace params: - name: deployment value: $(params.deployment-name) @@ -105,9 +102,9 @@ spec: - apply-manifests ---- + -The Pipeline definition abstracts away the specifics of the Git source repository and image registries. These details are added as `params` when a Pipeline is triggered and executed. +The pipeline definition abstracts away the specifics of the Git source repository and image registries. These details are added as `params` when a pipeline is triggered and executed. -. Create the Pipeline: +. Create the pipeline: + ---- $ oc create -f @@ -120,13 +117,13 @@ Alternatively, you can also execute the YAML file directly from the Git reposito $ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/{pipelines-ver}/01_pipeline/04_pipeline.yaml ---- -. Use the `tkn pipeline list` command to verify that the Pipeline is added to the application: +. Use the `tkn pipeline list` command to verify that the pipeline is added to the application: + ---- $ tkn pipeline list ---- + -The output verifies that the `build-and-deploy` Pipeline was created: +The output verifies that the `build-and-deploy` pipeline was created: + ---- NAME AGE LAST RUN STARTED DURATION STATUS