@@ -63,9 +63,20 @@ After running the command above, the pipeline you created earlier is now running
6363and a number of pods are created to execute the tasks that are defined as part of the
6464pipeline. After 4-5 minutes, the pipeline run should finish successfully.
6565
66+ Additionally, you will begin to see the pipeline run logs immediately after the pod
67+ for the first task is done initializing.
68+
69+ Before continuing, grab the name of the pipeline run and save it to an environment
70+ variable so you can learn more about the pipeline run later in this workshop:
71+
72+ [source,bash,role=execute-2]
73+ ----
74+ RUN=`tkn pr ls -o jsonpath='{$.items[?(@.status.conditions[0].reason=="Running")].metadata.name}' | tr ' ' '\n' | head -1`; echo $RUN
75+ ----
76+
6677To view the pipeline run created, run the following `tkn` command:
6778
68- [source,bash,role=execute-1 ]
79+ [source,bash,role=execute-2 ]
6980----
7081tkn pr ls
7182----
@@ -78,7 +89,7 @@ a pod that will host steps that each run in a separate container. You can see
7889the pod for the first task on your pipeline (i.e. `build` ) by running the following
7990command:
8091
81- [source,bash,role=execute-1 ]
92+ [source,bash,role=execute-2 ]
8293----
8394oc get pods
8495----
@@ -90,24 +101,6 @@ task of your pipeline.
90101Tekton CLI Logs
91102---------------
92103
93- To view the logs for the pipeline run, you need the unique name assigned to it
94- when you ran `tkn pipeline start` . This is the same name as `tkn pr ls` outputs.
95-
96- To grab the name of this into an environment variable, run:
97-
98- [source,bash,role=execute-1]
99- ----
100- RUN=`tkn pr ls -o jsonpath='{$.items[?(@.status.conditions[0].reason=="Running")].metadata.name}' | tr ' ' '\n' | head -1`; echo $RUN
101- ----
102-
103- Then run the following `tkn` command to access the logs of the pipeline run using the environment
104- variable to specify the name of the pipeline run:
105-
106- [source,bash,role=execute-1]
107- ----
108- tkn pr logs $RUN -f
109- ----
110-
111104The logs output tells you what tasks are running as well as what step it is running.
112105You'll see the output structured as `[task_name : step_name]` . An example from this
113106pipeline run is below for the `generate` step of the `build` task:
@@ -144,3 +137,9 @@ While the pipeline run is executing, you can take a look at how you can visualiz
144137a pipeline run through the OpenShift web console in the next section. Leave the logs
145138running so that you can confirm the successful deployment message when the pipeline run
146139finishes.
140+
141+ Clear the terminal without the running logs before continuing:
142+ [source,bash,role=execute-2]
143+ ----
144+ clear
145+ ----
0 commit comments