jenkinsci / jenkinsci/ghprb-plugin
GHPRB Job DSL for pipelines breaks with Job DSL >= 1.70
- Dominant language
- Java
- Stars
- 512
- Forks
- 601
- PR merge metrics
- No merged PRs in 30d
Description
GHPRB Job DSL for pipelines breaks with Job DSL >= 1.70
If I understand correctly, the GHPRB Job DSL example tracks the GitHub repo specified in the `scm`, `git`, `remote` context - see the example Job DSL below taken from the plugin site.
However, support for the `scm{}` context (and others) has been dropped for Pipeline Jobs in Job DSL 1.70 (see https://github.com/jenkinsci/job-dsl-plugin/wiki/Migration#migrating-to-170).
If `scm{}` is deprecated, it would seem that the remote for tracking must be specified some other way.
```
pipelineJob('example') {
scm {
git {
remote {
github('test-owner/test-project')
refspec('+refs/pull/*:refs/remotes/origin/pr/*')
}
branch('${sha1}')
}
}
triggers {
githubPullRequest {
admin('user_1')
admins(['user_2', 'user_3'])
userWhitelist('you@you.com')
userWhitelist(['me@me.com', 'they@they.com'])
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('PENDING', 'still in progress...')
completedStatus('ERROR', 'Something went really wrong. Investigate!')
}
}
}
}
}
```
Contributor guide
Research direction
Read the Job DSL 1.70 migration note linked in the issue and compare it with the embedded pipelineJob example. Trace the plugin's pipeline SCM configuration entry point, then identify a supported replacement and verify the example with Job DSL >=1.70; it is done when the documented DSL no longer relies on the removed scm context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github, java
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100