Bitbucket Gradle Plugins
com.arcmutate.bitbucket.cloud
The com.arcmutate.bitbucket.cloud
plugin integrates with Bitbucket cloud and provides two tasks
- pitest-bitbucket
- pitest-bitbucket-upload
The pitest-bitbucket
task runs pitest against all modules for which it has been configured, then updates the current PR.
The pitest-bitbucket-upload
task updates the PR based on previously generated gitci
json files.
Parameters can be configured via a pitestBitbucket
extension block
pitestBitbucket {
mutantEmoji = ':vomiting_face:'
trailingText = 'Happy mutant hunting'
}
com.arcmutate.bitbucket.server
The com.arcmutate.bitbucket.server
plugin integrates with self hosted Bitbucket server instances which implement version 1 of the Bitbucket Rest API.
The plugin provides two tasks
- pitest-bitbucket-server
- pitest-bitbucket-server-upload
The pitest-bitbucket-server
task runs pitest against all modules for which it has been configured, then updates the current PR.
The pitest-bitbucket-server-upload
task updates the PR based on previously generated gitci
json files.
Parameters can be configured via a pitestBitbucketServer
extension block
pitestBitbucket {
project = 'myProject'
repo = 'myRepo'
mutantEmoji = ':vomiting_face:'
trailingText = 'Happy mutant hunting'
}
Extension Parameters
When running in Bitbucket Pipelines, most required parameters will be autoset from environment variables. These parameters must be explicitly set in other environments.
token
Required
An App password token with write access to PRs in the repository. If present, this property will be automatically populated from an environment variable named REPO_TOKEN
.
This environment variable is not automatically supplied by Bitbucket Pipelines.
user
Optional
Required when authenticating using an App password with Bitbucket cloud.
The user associated with the App password. If present, this property will be automatically populated from an environment variable named REPO_USER
.
This environment variable is not automatically supplied by Bitbucket Pipelines.
repository
Required
Autoset
The repository to update. If present, this property will be automatically populated from an environment variable named BITBUCKET_REPO_SLUG
.
This environment variable is automatically set by Bitbucket Pipelines.
pr
Required
Autoset
The pull request to update. If present, this property will be automatically populated from an environment variable named BITBUCKET_PR_ID
.
This environment variable is automatically set by Bitbucket Pipelines.
workspace
Required (Bitbucket-cloud)
Autoset
The workspace the repository belongs to. If present, this property will be automatically populated from an environment variable named BITBUCKET_WORKSPACE
.
This environment variable is automatically set by Bitbucket Pipelines.
url
Required
The base URL of the bitbucket api. For the bitbucket-cloud
goal this will be defaulted to https://api.bitbucket.org/2.0
if not supplied. For the bitbucket-server
goal a value must always be supplied manually e.g. (http://your.domain/rest/api/1.0/
)
project
Required (bitbucket-server)
The project the repository is part of. This parameter is required for the bitbucket-server
goal, but should not be set when using bitbucket-cloud
.
pitestReportPaths
Optional
By default, the plugin will examine the output directories of tasks named pitest
when looking for json files to process. If this behaviour is incorrect for your build, it can be overridden by setting this parameter.
When set, only files within the explicitly supplied directories will be examined.
This parameter is intended for use with the pitest-bitbucket-upload
and pitest-bitbucket-server-upload
tasks when files have already been generated by a pitest run.
mutantEmoji
Optional
Character string to use in summary table for surviving mutants.
killedEmoji
Optional
Character string to use in summary table when no surviving mutants.
trailingText
Optional
Custom text to place at end of summary.