Skip to content

Commit 62c3c0e

Browse files
authored
docs: commitlint with jx3 (#3814)
Give an example (step template) of how to use commitlint with Jenkins X.
1 parent a4fe3db commit 62c3c0e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/guides-ci-setup.md

+23
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,29 @@ lint:commit:
145145
- echo "${CI_COMMIT_MESSAGE}" | commitlint
146146
```
147147
148+
## Jenkins X
149+
150+
```
151+
apiVersion: tekton.dev/v1beta1
152+
kind: PipelineRun
153+
metadata:
154+
name: pullrequest
155+
spec:
156+
pipelineSpec:
157+
tasks:
158+
- name: conventional-commits
159+
taskSpec:
160+
steps:
161+
- name: lint-commit-messages
162+
image: commitlint/commitlint
163+
script: |
164+
#!/usr/bin/env sh
165+
. .jx/variables.sh
166+
commitlint --extends '@commitlint/config-conventional' --from $PR_BASE_SHA --to $PR_HEAD_SHA
167+
serviceAccountName: tekton-bot
168+
timeout: 15m
169+
```
170+
148171
### 3rd party integrations
149172
150173
#### [Codemagic](https://codemagic.io/)

0 commit comments

Comments
 (0)