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
Implement support for skip CI commands in commit messages to allow
users to skip PipelineRun execution. Supports [skip ci], [ci skip],
[skip tkn], and [tkn skip] commands.
When a skip command is detected in the commit message, PipelineRun
execution is skipped. However, GitOps commands (/test, /retest, etc.)
will still trigger PipelineRuns regardless of the skip command,
allowing users to manually trigger CI when needed.
Jira: https://issues.redhat.com/browse/SRVKP-8933
Signed-off-by: Akshay Pant <akshay.akshaypant@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ Before getting started with Pipelines-as-Code, ensure you have:
65
65
-**Multi-provider support**: Works with GitHub (via GitHub App & Webhook), GitLab, Gitea, Bitbucket Data Center & Cloud via webhooks.
66
66
-**Annotation-driven workflows**: Target specific events, branches, or CEL expressions and gate untrusted PRs with `/ok-to-test` and `OWNERS`; see [Running the PipelineRun](https://pipelinesascode.com/docs/guide/running/).
67
67
-**ChatOps style control**: `/test`, `/retest`, `/cancel`, and branch or tag selectors let you rerun or stop PipelineRuns from PR comments or commit messages; see [GitOps Commands](https://pipelinesascode.com/docs/guide/gitops_commands/).
68
+
-**Skip CI support**: Use `[skip ci]`, `[ci skip]`, `[skip tkn]`, or `[tkn skip]` in commit messages to skip automatic PipelineRun execution for documentation updates or minor changes; GitOps commands can still override and trigger runs manually; see [Skip CI Commands](https://pipelinesascode.com/docs/guide/gitops_commands/#skip-ci-commands).
68
69
-**Feedback**: GitHub Checks capture per-task timing, log snippets, and optional error annotations while redacting secrets; see [PipelineRun status](https://pipelinesascode.com/docs/guide/statuses/).
69
70
-**Inline resolution**: The resolver bundles `.tekton/` resources, inlines remote tasks from Artifact Hub or Tekton Hub, and validates YAML before cluster submission; see [Resolver](https://pipelinesascode.com/docs/guide/resolver/).
70
71
-**CLI**: `tkn pac` bootstraps installs, manages Repository CRDs, inspects logs, and resolves runs locally; see the [CLI guide](https://pipelinesascode.com/docs/guide/cli/).
Pipelines-as-Code supports skip commands in commit messages that allow you to skip
493
+
PipelineRun execution for specific commits. This is useful when making documentation
494
+
changes, minor fixes, or work-in-progress commits where running the full CI pipeline
495
+
is unnecessary.
496
+
497
+
### Supported Skip Commands
498
+
499
+
You can include any of the following commands anywhere in your commit message to skip
500
+
PipelineRun execution:
501
+
502
+
* `[skip ci]` - Skip continuous integration
503
+
* `[ci skip]` - Alternative format for skipping CI
504
+
* `[skip tkn]` - Skip Tekton PipelineRuns
505
+
* `[tkn skip]` - Alternative format for skipping Tekton
506
+
507
+
**Note:** Skip commands are **case-sensitive** and must be in lowercase with brackets.
508
+
509
+
### Example Usage
510
+
511
+
```text
512
+
docs: update README with installation instructions [skip ci]
513
+
```
514
+
515
+
or
516
+
517
+
```text
518
+
WIP: refactor authentication module
519
+
520
+
This is still in progress and not ready for testing yet.
521
+
522
+
[ci skip]
523
+
```
524
+
525
+
### How Skip Commands Work
526
+
527
+
When a commit message contains a skip command:
528
+
529
+
1. **Pull Requests**: No PipelineRuns will be created when the PR is opened or updated and HEAD commit contains skip command. A neutral status check will be displayed on the PR indicating that CI was skipped.
530
+
2. **Push Events**: No PipelineRuns will be created when pushing to a branch with that commit message. A neutral status check will be displayed on the commit.
531
+
532
+
**Note:** A neutral status check is created on your git provider to provide visibility that the commit was acknowledged but CI was intentionally skipped. This helps distinguish between commits that were ignored due to skip commands versus commits where CI hasn't run.
533
+
534
+
### GitOps Commands Override Skip CI
535
+
536
+
**Important:** Skip CI commands can be overridden by using GitOps commands. Even if
537
+
a commit contains a skip command like `[skip ci]`, you can still manually trigger
538
+
PipelineRuns using:
539
+
540
+
* `/test` - Trigger all matching PipelineRuns
541
+
* `/test <pipelinerun-name>` - Trigger a specific PipelineRun
542
+
* `/retest` - Retrigger failed PipelineRuns
543
+
* `/retest <pipelinerun-name>` - Retrigger a specific PipelineRun
544
+
* `/ok-to-test` - Allow running CI for external contributors
545
+
* `/custom-comment` - Trigger PipelineRun having on-comment annotation
546
+
547
+
This allows you to skip automatic CI execution while still maintaining the ability
0 commit comments