Skip to content

Instantly share code, notes, and snippets.

@lanwen
Created March 16, 2018 10:45
Show Gist options
  • Save lanwen/597455795ceaeedf858a9723259e9cb9 to your computer and use it in GitHub Desktop.
Save lanwen/597455795ceaeedf858a9723259e9cb9 to your computer and use it in GitHub Desktop.
def coverageStatus(String sha, String base) {
step([
$class: 'GitHubCommitStatusSetter',
commitShaSource: [$class: 'ManuallyEnteredShaSource', sha: sha],
contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: 'coverage/line'],
reposSource: [
$class: 'ManuallyEnteredRepositorySource',
url: 'https://github.com/org/name'
],
errorHandlers: [[$class: 'ShallowAnyErrorHandler']],
statusResultSource: [
$class: 'CoberturaCoverageStatusResultSource',
baseJob: base
]
])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment