- step([
- $class: 'GitHubCommitStatusSetter',
- reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/Nordix/Meridio'],
- commitShaSource: [$class: 'ManuallyEnteredShaSource', sha: GetCommitSha()],
- contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: context],
- errorHandlers: [[$class: 'ChangingBuildStatusErrorHandler', result: 'UNSTABLE']],
- statusResultSource: [ $class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', message: message, state: state]] ]
- ])
+ if (env.DRY_RUN != 'true') {
+ step([
+ $class: 'GitHubCommitStatusSetter',
+ reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/Nordix/Meridio'],
+ commitShaSource: [$class: 'ManuallyEnteredShaSource', sha: GetCommitSha()],
+ contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: context],
+ errorHandlers: [[$class: 'ShallowAnyErrorHandler']], // Prevent GitHubCommitStatusSetter to set the job status to unstable
+ statusResultSource: [ $class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', message: message, state: state]] ]
+ ])
+ }