Link Search Menu Expand Document

GitLab Gradle Plugin

Maven Central

The com.groupcdg.pitest.gitlab plugin provides two tasks

  • pitest-gitlab
  • pitest-gitlab-upload

The pitest-gitlab task runs pitest against all modules for which it has been configured, then updates the current MR.

The pitest-gitlab-upload task updates the MR based on previously generated gitci json files.

Parameters can be configured via a pitestGitlab extension block

pitestGitlab {
  mutantEmoji = ':imp:'
  trailingText = 'Happy mutant hunting'
}

See here for a working example using the plugin with GitLab CI.

Extension Parameters

When running in GitLab CI, most required parameters will be autoset from the predefined environment variables.

In other environments, these parameters must be set explicitly.

repoToken

Required

A Gitlab Personal Access Token, or Organisation Token.

If present, this property will be automatically populated from an environment variable named REPO_TOKEN.

If GitLab CI is being used a CI variable created with this name will be automatically exported as an environment variable. By default the variable will only be available to protected branches. This option must be unselected, or all PR branches must be made protected.

projectId

Required

Autoset

The id of the project to update.

If present, this property will be automatically populated from an environment variable named CI_PROJECT_ID.

This environment variable is automatically set by GitLab CI.

baseURl

Required

Autoset

The base URL of the GitLab api. If present, this property will be automatically populated from an environment variable named CI_SERVER_URL.

This environment variable is automatically set by GitLab CI.

mergeRequestIID

Required

Autoset

The merge request to update. If present, this property will be automatically populated from an environment variable named CI_MERGE_REQUEST_IID.

This environment variable is automatically set by GitLab CI.

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.