Skip to content

Commit

Permalink
docs: commitlint with jx3 (#3814)
Browse files Browse the repository at this point in the history
Give an example (step template) of 
how to use commitlint with Jenkins X.
  • Loading branch information
Realiserad authored Dec 5, 2023
1 parent a4fe3db commit 62c3c0e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/guides-ci-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,29 @@ lint:commit:
- echo "${CI_COMMIT_MESSAGE}" | commitlint
```
## Jenkins X
```
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
name: pullrequest
spec:
pipelineSpec:
tasks:
- name: conventional-commits
taskSpec:
steps:
- name: lint-commit-messages
image: commitlint/commitlint
script: |
#!/usr/bin/env sh
. .jx/variables.sh
commitlint --extends '@commitlint/config-conventional' --from $PR_BASE_SHA --to $PR_HEAD_SHA
serviceAccountName: tekton-bot
timeout: 15m
```
### 3rd party integrations
#### [Codemagic](https://codemagic.io/)
Expand Down

0 comments on commit 62c3c0e

Please sign in to comment.