Skip to content

Commit

Permalink
docs: add bitbucket to ci-setup guide (#4147)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantwforsythe authored Sep 12, 2024
1 parent aacc345 commit adc2e47
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/guides/ci-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,25 @@ spec:
timeout: 15m
```

## BitBucket

Validate commits within a PR by leveraging [BitBucket`s default variables](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/):

```yml
image: node:18
pipelines:
pull-requests:
default:
- step:
name: Lint commit messages
script:
- npm install --save-dev @commitlint/config-conventional @commitlint/cli
- npx commitlint --from $BITBUCKET_COMMIT~$(git rev-list --count $BITBUCKET_BRANCH ^origin/$BITBUCKET_PR_DESTINATION_BRANCH) --to $BITBUCKET_COMMIT --verbose
```

BitBucket limits git clone depth to 20 commits by default. You can change this behaviour by [changing the `clone` option](https://support.atlassian.com/bitbucket-cloud/docs/git-clone-behavior/).

### 3rd party integrations

#### [Codemagic](https://codemagic.io/)
Expand Down

0 comments on commit adc2e47

Please sign in to comment.