Skip to content

Commit

Permalink
Merge pull request #717 from daspilker/JENKINS-31214
Browse files Browse the repository at this point in the history
[JENKINS-31214] deprecated built-in support for GitHub Pull Request Builder Plugin
  • Loading branch information
daspilker committed Jan 8, 2016
2 parents 0b8fc30 + 6907be0 commit 45a2024
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 6 deletions.
4 changes: 4 additions & 0 deletions docs/Home.md
Expand Up @@ -25,6 +25,10 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
([JENKINS-31557](https://issues.jenkins-ci.org/browse/JENKINS-31557))
* Allow `BuildParametersContext` to be extended
([JENKINS-32285](https://issues.jenkins-ci.org/browse/JENKINS-32285))
* Built-in support for the
[GitHub Pull Request Builder Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin)
is deprecated, see [Migration](Migration#migrating-to-143)
([JENKINS-31214](https://issues.jenkins-ci.org/browse/JENKINS-31214))
* 1.42 (January 05 2016)
* Added support for the [Dashboard View Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Dashboard+View)
([JENKINS-29146](https://issues.jenkins-ci.org/browse/JENKINS-29146))
Expand Down
37 changes: 37 additions & 0 deletions docs/Migration.md
@@ -1,3 +1,40 @@
## Migrating to 1.43

### GitHub Pull Request Builder

Built-in support for the
[GitHub Pull Request Builder Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin) is
[[deprecated|Deprecation-Policy]] and will be removed. The GitHub Pull Request Builder Plugin implements the Job DSL
extension point and provides it's own Job DSL syntax since version 1.29.7.

DSL prior to 1.43
```groovy
job('example') {
triggers {
pullRequest {
}
}
publishers {
mergePullRequest {
}
}
}
```

DSL since 1.43
```groovy
job('example') {
triggers {
githubPullRequest {
}
}
publishers {
mergeGithubPullRequest {
}
}
}
```

## Migrating to 1.42

### Task Scanner
Expand Down
1 change: 1 addition & 0 deletions job-dsl-api-viewer/src/templates/home.hbs
Expand Up @@ -19,6 +19,7 @@
wiki pages for documentation:
</p>
<ul>
<li><a href="https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin#GitHubpullrequestbuilderplugin-JobDSLSupport">GitHub Pull Request Builder Plugin</a></li>
<li><a href="https://wiki.jenkins-ci.org/display/JENKINS/JGiven+Plugin#JGivenPlugin-JobDSL">JGiven Plugin</a></li>
</ul>
</div>
Expand Down
Expand Up @@ -1458,9 +1458,10 @@ class PublisherContext extends AbstractExtensibleContext {
*
* @since 1.33
*/
@Deprecated
@RequiresPlugin(id = 'ghprb', minimumVersion = '1.17')
void mergePullRequest(@DslContext(PullRequestPublisherContext) Closure contextClosure = null) {
jobManagement.logPluginDeprecationWarning('ghprb', '1.26')
jobManagement.logDeprecationWarning()

PullRequestPublisherContext pullRequestPublisherContext = new PullRequestPublisherContext(jobManagement)
ContextHelper.executeInContext(contextClosure, pullRequestPublisherContext)
Expand Down
Expand Up @@ -114,9 +114,10 @@ class ItemTriggerContext extends AbstractExtensibleContext {
*
* @since 1.22
*/
@Deprecated
@RequiresPlugin(id = 'ghprb', minimumVersion = '1.15-0')
void pullRequest(@DslContext(PullRequestBuilderContext) Closure contextClosure) {
jobManagement.logPluginDeprecationWarning('ghprb', '1.26')
jobManagement.logDeprecationWarning()

PullRequestBuilderContext pullRequestBuilderContext = new PullRequestBuilderContext(jobManagement)
ContextHelper.executeInContext(contextClosure, pullRequestBuilderContext)
Expand Down
Expand Up @@ -4558,7 +4558,7 @@ class PublisherContextSpec extends Specification {
deleteOnMerge[0].value() == false
}
1 * jobManagement.requireMinimumPluginVersion('ghprb', '1.17')
1 * jobManagement.logPluginDeprecationWarning('ghprb', '1.26')
1 * jobManagement.logDeprecationWarning()
}
def 'mergePullRequest with all options'() {
Expand All @@ -4585,7 +4585,7 @@ class PublisherContextSpec extends Specification {
}
1 * jobManagement.requireMinimumPluginVersion('ghprb', '1.17')
2 * jobManagement.requireMinimumPluginVersion('ghprb', '1.26')
1 * jobManagement.logPluginDeprecationWarning('ghprb', '1.26')
1 * jobManagement.logDeprecationWarning()
}
def 'mergePullRequest with no options and older plugin version'() {
Expand All @@ -4605,7 +4605,7 @@ class PublisherContextSpec extends Specification {
disallowOwnCode[0].value() == false
}
1 * jobManagement.requireMinimumPluginVersion('ghprb', '1.17')
1 * jobManagement.logPluginDeprecationWarning('ghprb', '1.26')
1 * jobManagement.logDeprecationWarning()
}
def 'publishBuild with no options'() {
Expand Down
Expand Up @@ -396,7 +396,7 @@ class ItemTriggerContextSpec extends Specification {
}
1 * mockJobManagement.requireMinimumPluginVersion('ghprb', '1.15-0')
1 * mockJobManagement.requireMinimumPluginVersion('ghprb', '1.26')
1 * mockJobManagement.logPluginDeprecationWarning('ghprb', '1.26')
1 * mockJobManagement.logDeprecationWarning()
}

def 'call pull request trigger invalid build result'() {
Expand Down

0 comments on commit 45a2024

Please sign in to comment.