Я пытаюсь создать задание Jenkins для GitHub Pull Request bulder с помощью DSL-скрипта, но мой groovy-скрипт выдает ошибку, исправьте мой код, если я использую неправильный синтаксис.
githubPullRequest {
admin('user_1')
admins(['user_2', 'user_3'])
userWhitelist('[email protected]')
userWhitelist(['[email protected]', '[email protected]'])
orgWhitelist('my_github_org')
orgWhitelist(['your_github_org', 'another_org'])
cron('H/5 * * * *')
triggerPhrase('OK to test')
onlyTriggerPhrase()
useGitHubHooks()
permitAll()
autoCloseFailedPullRequests()
allowMembersOfWhitelistedOrgsAsAdmin()
extensions {
commitStatus {
context('deploy to staging site')
triggeredStatus('starting deployment to staging site...')
startedStatus('deploying to staging site...')
statusUrl('http://mystatussite.com/prs')
completedStatus('SUCCESS', 'All is well')
completedStatus('FAILURE', 'Something went wrong. Investigate!')
completedStatus('ERROR', 'Something went really wrong. Investigate!')
}
it / triggers / 'org.jenkinsci.plugins.ghprb.GhprbTrigger' / extensions / 'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildStatus' / messages << 'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage' {
message('All tests passed!')
result('SUCCESS')
}
it / triggers / 'org.jenkinsci.plugins.ghprb.GhprbTrigger' / extensions / 'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildStatus' / messages << 'org.jenkinsci.plugins.ghprb.extensions.comments.GhprbBuildResultMessage' {
message('An unknown error occurred.')
result('ERROR')
}
}