Skip to content

Commit 5351c12

Browse files
committed
Add doc for step display name support
1 parent 9f4f28a commit 5351c12

File tree

4 files changed

+126
-0
lines changed

4 files changed

+126
-0
lines changed

docs/pipeline-api.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4389,6 +4389,19 @@ Each Step in a Task must have a unique name.</p>
43894389
</tr>
43904390
<tr>
43914391
<td>
4392+
<code>displayName</code><br/>
4393+
<em>
4394+
string
4395+
</em>
4396+
</td>
4397+
<td>
4398+
<em>(Optional)</em>
4399+
<p>DisplayName is a user-facing name of the step that may be
4400+
used to populate a UI.</p>
4401+
</td>
4402+
</tr>
4403+
<tr>
4404+
<td>
43924405
<code>image</code><br/>
43934406
<em>
43944407
string
@@ -6970,6 +6983,19 @@ StepActionSpec
69706983
<table>
69716984
<tr>
69726985
<td>
6986+
<code>displayName</code><br/>
6987+
<em>
6988+
string
6989+
</em>
6990+
</td>
6991+
<td>
6992+
<em>(Optional)</em>
6993+
<p>DisplayName is a user-facing name of the step that may be
6994+
used to populate a UI.</p>
6995+
</td>
6996+
</tr>
6997+
<tr>
6998+
<td>
69736999
<code>description</code><br/>
69747000
<em>
69757001
string
@@ -7819,6 +7845,19 @@ Refer Go&rsquo;s ParseDuration documentation for expected format: <a href="https
78197845
<tbody>
78207846
<tr>
78217847
<td>
7848+
<code>displayName</code><br/>
7849+
<em>
7850+
string
7851+
</em>
7852+
</td>
7853+
<td>
7854+
<em>(Optional)</em>
7855+
<p>DisplayName is a user-facing name of the step that may be
7856+
used to populate a UI.</p>
7857+
</td>
7858+
</tr>
7859+
<tr>
7860+
<td>
78227861
<code>description</code><br/>
78237862
<em>
78247863
string
@@ -9179,6 +9218,19 @@ StepActionSpec
91799218
<table>
91809219
<tr>
91819220
<td>
9221+
<code>displayName</code><br/>
9222+
<em>
9223+
string
9224+
</em>
9225+
</td>
9226+
<td>
9227+
<em>(Optional)</em>
9228+
<p>DisplayName is a user-facing name of the step that may be
9229+
used to populate a UI.</p>
9230+
</td>
9231+
</tr>
9232+
<tr>
9233+
<td>
91829234
<code>description</code><br/>
91839235
<em>
91849236
string
@@ -13516,6 +13568,19 @@ Each Step in a Task must have a unique name.</p>
1351613568
</tr>
1351713569
<tr>
1351813570
<td>
13571+
<code>displayName</code><br/>
13572+
<em>
13573+
string
13574+
</em>
13575+
</td>
13576+
<td>
13577+
<em>(Optional)</em>
13578+
<p>DisplayName is a user-facing name of the step that may be
13579+
used to populate a UI.</p>
13580+
</td>
13581+
</tr>
13582+
<tr>
13583+
<td>
1351913584
<code>image</code><br/>
1352013585
<em>
1352113586
string
@@ -14032,6 +14097,19 @@ WhenExpressions
1403214097
<tbody>
1403314098
<tr>
1403414099
<td>
14100+
<code>displayName</code><br/>
14101+
<em>
14102+
string
14103+
</em>
14104+
</td>
14105+
<td>
14106+
<em>(Optional)</em>
14107+
<p>DisplayName is a user-facing name of the step that may be
14108+
used to populate a UI.</p>
14109+
</td>
14110+
</tr>
14111+
<tr>
14112+
<td>
1403514113
<code>description</code><br/>
1403614114
<em>
1403714115
string
@@ -14373,6 +14451,19 @@ Cannot be updated.</p>
1437314451
</tr>
1437414452
<tr>
1437514453
<td>
14454+
<code>displayName</code><br/>
14455+
<em>
14456+
string
14457+
</em>
14458+
</td>
14459+
<td>
14460+
<em>(Optional)</em>
14461+
<p>DisplayName is a user-facing name of the step that may be
14462+
used to populate a UI.</p>
14463+
</td>
14464+
</tr>
14465+
<tr>
14466+
<td>
1437614467
<code>image</code><br/>
1437714468
<em>
1437814469
string

docs/stepactions.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ A `StepAction` definition supports the following fields:
5252
- [`workingDir`](#declaring-workingdir)
5353
- [`securityContext`](#declaring-securitycontext)
5454
- [`volumeMounts`](#declaring-volumemounts)
55+
- [`displayName`](#declaring-displayName)
5556

5657
[kubernetes-overview]:
5758
https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields
@@ -384,6 +385,22 @@ spec:
384385
script: ...
385386
```
386387

388+
### Declaring displayName
389+
390+
The `displayName` field is an optional field that allows you to add a user-facing name to the step that may be used to populate a UI.
391+
392+
```yaml
393+
apiVersion: tekton.dev/v1
394+
kind: StepAction
395+
metadata:
396+
name: myStep
397+
spec:
398+
displayName: my step
399+
params: ...
400+
volumeMounts: ...
401+
image: ...
402+
script: ...
403+
```
387404

388405
### Referencing a StepAction
389406

docs/tasks.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ weight: 201
2020
- [Breakpoint on failure with `onError`](#breakpoint-on-failure-with-onerror)
2121
- [Redirecting step output streams with `stdoutConfig` and `stderrConfig`](#redirecting-step-output-streams-with-stdoutconfig-and-stderrconfig)
2222
- [Guarding `Step` execution using `when` expressions](#guarding-step-execution-using-when-expressions)
23+
- [Specifying displayName](#specifying-displayname)
2324
- [Specifying `Parameters`](#specifying-parameters)
2425
- [Specifying `Workspaces`](#specifying-workspaces)
2526
- [Emitting `Results`](#emitting-results)
@@ -599,6 +600,22 @@ The StepState for a skipped step looks like something similar to the below:
599600
```
600601
Where `terminated.exitCode` is `0` and `terminationReason` is `Skipped` to indicate the Step exited successfully and was skipped.
601602

603+
#### Specifying displayName
604+
605+
The `displayName` field is an optional field that allows you to add a user-facing name to the step that may be used to populate a UI.
606+
607+
```yaml
608+
steps:
609+
- name: ignore-failure-and-produce-a-result
610+
displayName: "Ignore failure and produce a result"
611+
onError: continue
612+
image: busybox
613+
script: |
614+
echo -n 123 | tee $(results.result1.path)
615+
exit 1
616+
echo -n 456 | tee $(results.result2.path)
617+
```
618+
602619
### Specifying `Parameters`
603620

604621
You can specify parameters, such as compilation flags or artifact names, that you want to supply to the `Task` at execution time.

examples/v1/pipelineruns/pipeline-with-displayname.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
description: The sum of the two provided integers
1919
steps:
2020
- name: sum
21+
displayName: Do the sum
2122
image: mirror.gcr.io/bash
2223
script: |
2324
#!/usr/bin/env bash

0 commit comments

Comments
 (0)