You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ tracking using a Git workflow.
35
35
36
36
<--->
37
37
38
-
- Pull-request "*GitOps*" actions through comments with `/retest`, `/test <pipeline-name>` and so on.
38
+
- Pull-request "*GitOps*" actions through comments with `/retest` (reruns failed pipelines), `/test <pipeline-name>` (force rerun specific pipeline) and so on.
39
39
40
40
- Automatic Task resolution in Pipelines (local Tasks, Artifact Hub, and remote URLs)
Copy file name to clipboardExpand all lines: docs/content/docs/guide/gitops_commands.md
+18-3Lines changed: 18 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The advantage of using a `GitOps command` is that it provides a journal of all t
10
10
11
11
## GitOps Commands on Pull Requests
12
12
13
-
For example, when you are on a Pull Request, you may want to restart all your PipelineRuns. To do so, you can add a comment on your Pull Request starting with `/retest`, and all PipelineRuns attached to that Pull Request will be restarted.
13
+
For example, when you are on a Pull Request, you may want to restart failed PipelineRuns. To do so, you can add a comment on your Pull Request starting with `/retest`, and all **failed**PipelineRuns attached to that Pull Request will be restarted. If all previous PipelineRuns for the same commit were successful, no new PipelineRuns will be created to avoid unnecessary duplication.
14
14
15
15
Example:
16
16
@@ -21,6 +21,21 @@ failure is not with your PR but seems to be an infrastructure issue.
21
21
/retest
22
22
```
23
23
24
+
The `/retest` command will only create new PipelineRuns if:
25
+
- Previous PipelineRuns for the same commit **failed**, OR
26
+
- No PipelineRuns exist for the same commit
27
+
28
+
If a successful PipelineRun already exists for the same commit, `/retest` will **skip** creating a new PipelineRun to avoid unnecessary duplication.
29
+
30
+
**To force a rerun regardless of previous status**, use:
31
+
```text
32
+
/retest <pipelinerun-name>
33
+
```
34
+
35
+
This will always create a new PipelineRun, even if previous runs were successful.
36
+
37
+
Similar to `/retest`, the `/ok-to-test` command will only create new PipelineRuns if no successful PipelineRun already exists for the same commit. This prevents duplicate runs when repository owners repeatedly approve the same commit.
38
+
24
39
If you have multiple `PipelineRun` and you want to target a specific `PipelineRun`, you can use the `/test` command followed by the specific PipelineRun name to restart it. Example:
25
40
26
41
```text
@@ -255,12 +270,12 @@ Here are the possible event types:
255
270
256
271
* `test-all-comment`: The event is a single `/test` that would test every matched PipelineRun.
257
272
* `test-comment`: The event is a `/test <PipelineRun>` comment that would test a specific PipelineRun.
258
-
* `retest-all-comment`: The event is a single `/retest` that would retest every matched PipelineRun.
273
+
* `retest-all-comment`: The event is a single `/retest` that would retest every matched **failed** PipelineRun. If a successful PipelineRun already exists for the same commit, no new PipelineRun will be created.
259
274
* `retest-comment`: The event is a `/retest <PipelineRun>` that would retest a specific PipelineRun.
260
275
* `on-comment`: The event is coming from a custom comment that would trigger a PipelineRun.
261
276
* `cancel-all-comment`: The event is a single `/cancel` that would cancel every matched PipelineRun.
262
277
* `cancel-comment`: The event is a `/cancel <PipelineRun>` that would cancel a specific PipelineRun.
263
-
* `ok-to-test-comment`: The event is a `/ok-to-test` that would allow running the CI for an unauthorized user.
278
+
* `ok-to-test-comment`: The event is a `/ok-to-test` that would allow running the CI for an unauthorized user. If a successful PipelineRun already exists for the same commit, no new PipelineRun will be created.
264
279
265
280
If a repository owner comments `/ok-to-test` on a pull request from an external contributor but no PipelineRun **matches** the `pull_request` event (or the repository has no `.tekton` directory), Pipelines-as-Code sets a **neutral** commit status. This indicates that no PipelineRun was matched, allowing other workflows—such as auto-merge—to proceed without being blocked.
0 commit comments